scim 1.4.18
scim_debug.h File Reference

Defines class scim::DebugOutput and related MACROS. More...

Classes

class  scim::DebugOutput
 The class to filter and redirect the debug messages. More...
 

Namespaces

namespace  scim
 

Macros

#define SCIM_DEBUG_MAX_VERBOSE   7
 
The mask for debug messages filtering.
#define SCIM_DEBUG_AllMask   ((uint32)~0)
 
#define SCIM_DEBUG_MainMask   1
 
#define SCIM_DEBUG_ConfigMask   2
 
#define SCIM_DEBUG_IMEngineMask   4
 
#define SCIM_DEBUG_BackEndMask   8
 
#define SCIM_DEBUG_FrontEndMask   16
 
#define SCIM_DEBUG_ModuleMask   32
 
#define SCIM_DEBUG_UtilityMask   64
 
#define SCIM_DEBUG_IConvMask   128
 
#define SCIM_DEBUG_LookupTableMask   256
 
#define SCIM_DEBUG_SocketMask   512
 
The macros to simplify the debug message print method.

You can output debug messages by this way: SCIM_DEBUG_IMENGINE(1) << "Hello World!\n";

#define SCIM_DEBUG(mask, level)   (scim::DebugOutput(mask,level) << scim::DebugOutput::serial_number () << __FILE__ << ":" << __LINE__ << " > ")
 
#define SCIM_DEBUG_MAIN(level)   SCIM_DEBUG(SCIM_DEBUG_MainMask,level)
 
#define SCIM_DEBUG_CONFIG(level)   SCIM_DEBUG(SCIM_DEBUG_ConfigMask,level)
 
#define SCIM_DEBUG_IMENGINE(level)   SCIM_DEBUG(SCIM_DEBUG_IMEngineMask,level)
 
#define SCIM_DEBUG_BACKEND(level)   SCIM_DEBUG(SCIM_DEBUG_BackEndMask,level)
 
#define SCIM_DEBUG_FRONTEND(level)   SCIM_DEBUG(SCIM_DEBUG_FrontEndMask,level)
 
#define SCIM_DEBUG_MODULE(level)   SCIM_DEBUG(SCIM_DEBUG_ModuleMask,level)
 
#define SCIM_DEBUG_UTILITY(level)   SCIM_DEBUG(SCIM_DEBUG_UtilityMask,level)
 
#define SCIM_DEBUG_ICONV(level)   SCIM_DEBUG(SCIM_DEBUG_IConvMask,level)
 
#define SCIM_DEBUG_LOOKUPTABLE(level)   SCIM_DEBUG(SCIM_DEBUG_LookupTableMask,level)
 
#define SCIM_DEBUG_SOCKET(level)   SCIM_DEBUG(SCIM_DEBUG_SocketMask,level)
 

Detailed Description

Defines class scim::DebugOutput and related MACROS.

All of the debug information should be output via scim::DebugOutput class. This class provides message filter and redirection ability.

Macro Definition Documentation

◆ SCIM_DEBUG_MAX_VERBOSE

#define SCIM_DEBUG_MAX_VERBOSE   7

◆ SCIM_DEBUG_AllMask

#define SCIM_DEBUG_AllMask   ((uint32)~0)

Show all messages.

◆ SCIM_DEBUG_MainMask

#define SCIM_DEBUG_MainMask   1

Show messages of main application.

◆ SCIM_DEBUG_ConfigMask

#define SCIM_DEBUG_ConfigMask   2

Show messages of Config objects

◆ SCIM_DEBUG_IMEngineMask

#define SCIM_DEBUG_IMEngineMask   4

Show messages of IMEngine objects

◆ SCIM_DEBUG_BackEndMask

#define SCIM_DEBUG_BackEndMask   8

Show messages of BackEnd objects

◆ SCIM_DEBUG_FrontEndMask

#define SCIM_DEBUG_FrontEndMask   16

Show messages of FrontEnd objects

◆ SCIM_DEBUG_ModuleMask

#define SCIM_DEBUG_ModuleMask   32

Show messages of Module objects

◆ SCIM_DEBUG_UtilityMask

#define SCIM_DEBUG_UtilityMask   64

Show messages of utility functions

◆ SCIM_DEBUG_IConvMask

#define SCIM_DEBUG_IConvMask   128

Show messages of IConvert objects

◆ SCIM_DEBUG_LookupTableMask

#define SCIM_DEBUG_LookupTableMask   256

Show messages of LookupTable objects

◆ SCIM_DEBUG_SocketMask

#define SCIM_DEBUG_SocketMask   512

Show messages of Socket objects

◆ SCIM_DEBUG

#define SCIM_DEBUG ( mask,
level )   (scim::DebugOutput(mask,level) << scim::DebugOutput::serial_number () << __FILE__ << ":" << __LINE__ << " > ")

◆ SCIM_DEBUG_MAIN

#define SCIM_DEBUG_MAIN ( level)    SCIM_DEBUG(SCIM_DEBUG_MainMask,level)

◆ SCIM_DEBUG_CONFIG

#define SCIM_DEBUG_CONFIG ( level)    SCIM_DEBUG(SCIM_DEBUG_ConfigMask,level)

◆ SCIM_DEBUG_IMENGINE

#define SCIM_DEBUG_IMENGINE ( level)    SCIM_DEBUG(SCIM_DEBUG_IMEngineMask,level)

◆ SCIM_DEBUG_BACKEND

#define SCIM_DEBUG_BACKEND ( level)    SCIM_DEBUG(SCIM_DEBUG_BackEndMask,level)

◆ SCIM_DEBUG_FRONTEND

#define SCIM_DEBUG_FRONTEND ( level)    SCIM_DEBUG(SCIM_DEBUG_FrontEndMask,level)

◆ SCIM_DEBUG_MODULE

#define SCIM_DEBUG_MODULE ( level)    SCIM_DEBUG(SCIM_DEBUG_ModuleMask,level)

◆ SCIM_DEBUG_UTILITY

#define SCIM_DEBUG_UTILITY ( level)    SCIM_DEBUG(SCIM_DEBUG_UtilityMask,level)

◆ SCIM_DEBUG_ICONV

#define SCIM_DEBUG_ICONV ( level)    SCIM_DEBUG(SCIM_DEBUG_IConvMask,level)

◆ SCIM_DEBUG_LOOKUPTABLE

#define SCIM_DEBUG_LOOKUPTABLE ( level)    SCIM_DEBUG(SCIM_DEBUG_LookupTableMask,level)

◆ SCIM_DEBUG_SOCKET

#define SCIM_DEBUG_SOCKET ( level)    SCIM_DEBUG(SCIM_DEBUG_SocketMask,level)