scim  1.4.18
scim::DebugOutput Class Reference

The class to filter and redirect the debug messages. More...

#include <scim_debug.h>

Public Member Functions

 DebugOutput (uint32 mask=SCIM_DEBUG_AllMask, uint32 verbose=1)
 Constructor. More...
 
template<typename T >
const DebugOutputoperator<< (const T &t) const
 A template stream output operator. More...
 

Static Public Member Functions

static void enable_debug (uint32 debug)
 The global method to enable the debug output. More...
 
static void enable_debug_by_name (const String &debug)
 The global method to enable the debug output by their names. More...
 
static void disable_debug (uint32 debug)
 Disable the debug type indicated by the given mask. More...
 
static void disable_debug_by_name (const String &debug)
 Disable the debug type indicated by the given name. More...
 
static void set_verbose_level (uint32 verbose)
 Set the debug verbose level. More...
 
static void set_output (const String &file)
 Set the debug output file. More...
 
static String serial_number ()
 

Detailed Description

The class to filter and redirect the debug messages.

Constructor & Destructor Documentation

◆ DebugOutput()

scim::DebugOutput::DebugOutput ( uint32  mask = SCIM_DEBUG_AllMask,
uint32  verbose = 1 
)

Constructor.

Parameters
mask- the debug filter mask.
verbose- the verbose level of the debug message.

Member Function Documentation

◆ operator<<()

template<typename T >
const DebugOutput& scim::DebugOutput::operator<< ( const T &  t) const
inline

A template stream output operator.

All kinds of data and variables can be output via DebugOutput by this operator.

◆ enable_debug()

static void scim::DebugOutput::enable_debug ( uint32  debug)
static

The global method to enable the debug output.

Parameters
debug- the mask to indicate which kind of debug should be enabled.

◆ enable_debug_by_name()

static void scim::DebugOutput::enable_debug_by_name ( const String debug)
static

The global method to enable the debug output by their names.

Parameters
debug- the name of the debug type to be enabled. The valid names are: all, main, config, imengine, backend, frontend, module, utility, iconv, lookuptable, socket.

◆ disable_debug()

static void scim::DebugOutput::disable_debug ( uint32  debug)
static

Disable the debug type indicated by the given mask.

Parameters
debug- the mask of the debug type to be disabled.

◆ disable_debug_by_name()

static void scim::DebugOutput::disable_debug_by_name ( const String debug)
static

Disable the debug type indicated by the given name.

Parameters
debug- the name of the debug type to be disabled.

◆ set_verbose_level()

static void scim::DebugOutput::set_verbose_level ( uint32  verbose)
static

Set the debug verbose level.

Parameters
verbose- the debug verbose level, 0 means no debug output.

◆ set_output()

static void scim::DebugOutput::set_output ( const String file)
static

Set the debug output file.

Parameters
file- the file to store the debug output. If equal to "stderr" or "cerr" then the debug output will be set to std:cerr. If equal to "stdout" or "cout" then the debug output will be set to std::cout.

◆ serial_number()

static String scim::DebugOutput::serial_number ( )
static

The documentation for this class was generated from the following file: