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.
template<typename T>
const DebugOutput & | operator<< (const T &t) const
| A template stream output operator.

## Static Public Member Functions

static void | enable_debug (uint32 debug)
| The global method to enable the debug output.
static void | enable_debug_by_name (const String &debug)
| The global method to enable the debug output by their names.
static void | disable_debug (uint32 debug)
| Disable the debug type indicated by the given mask.
static void | disable_debug_by_name (const String &debug)
| Disable the debug type indicated by the given name.
static void | set_verbose_level (uint32 verbose)
| Set the debug verbose level.
static void | set_output (const String &file)
| Set the debug output file.
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.

References SCIM_DEBUG_AllMask.

Referenced by operator<<().

## 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.

References DebugOutput().

## enable_debug()

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()

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()

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()

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()

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()

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()

String scim::DebugOutput::serial_number | ( |  | ) |

static

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

- scim_debug.h