toolsreport.h
来自「C++ image processing.Mainly it occupies 」· C头文件 代码 · 共 56 行
H
56 行
#ifndef ToolsReport_h
#define ToolsReport_h
/*
This "SOFTWARE" is a free software.
You are allowed to download, use, modify and redistribute this software.
The software is provided "AS IS" without warranty of any kind.
Copyright: University of Koblenz-Landau, Dirk Balthasar
*/
#include <stdarg.h> // vsnprintf
namespace tools
{
/**
message handling like printf
@ingroup interop
*/
void LogMessageFmt(const char *fmt, ...);
/// simple message handling
void LogMessage(const char *Msg);
/**
Base class for all message handlers. Can be used to redict messages.
Used by LogMessageFmt(..)
@ingroup interop
*/
class CMessageHandler
{
friend void LogMessageFmt(const char *fmt, ...);
friend void LogMessage(const char *Msg);
public:
/// destruction
virtual ~CMessageHandler(){}
protected:
/// override this function to implement what's to do with a message
virtual void LogMessage(const char *msg) = 0;
/// returns the currently activated messagehandler
static CMessageHandler *Get();
/// can be used to change the messagehandler
static void SetMessageHandler(CMessageHandler *MsgHandler)
{
m_MsgHandler = MsgHandler;
}
private:
static CMessageHandler *m_MsgHandler;
};
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?