DCMTK  Version 3.6.1 20131114
OFFIS DICOM Toolkit
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
dcmtk::log4cplus::LogLevelManager Class Reference

This class is used to "manage" LogLevel definitions. More...

+ Collaboration diagram for dcmtk::log4cplus::LogLevelManager:

Classes

struct  LogLevelToStringMethodRec
 
union  LogLevelToStringMethodRec.__unnamed__
 

Public Member Functions

log4cplus::tstring const & toString (LogLevel ll) const
 This method is called by all Layout classes to convert a LogLevel into a string. More...
 
LogLevel fromString (const log4cplus::tstring &s) const
 This method is called by all classes internally to log4cplus to convert a string into a LogLevel. More...
 
void pushToStringMethod (LogLevelToStringMethod newToString)
 When creating a "derived" LogLevel, a LogLevelToStringMethod should be defined and registered with the LogLevelManager by calling this method. More...
 
void pushToStringMethod (LogLevelToStringMethod_1_0 newToString)
 For compatibility with log4cplus 1.0.x.
 
void pushFromStringMethod (StringToLogLevelMethod newFromString)
 When creating a "derived" LogLevel, a StringToLogLevelMethod should be defined and registered with the LogLevelManager by calling this method. More...
 

Private Types

typedef OFVector
< LogLevelToStringMethodRec
LogLevelToStringMethodList
 
typedef OFVector
< StringToLogLevelMethod > 
StringToLogLevelMethodList
 

Private Member Functions

 LogLevelManager (const LogLevelManager &)
 
LogLevelManageroperator= (const LogLevelManager &)
 

Private Attributes

LogLevelToStringMethodList toStringMethods
 
StringToLogLevelMethodList fromStringMethods
 

Detailed Description

This class is used to "manage" LogLevel definitions.

This class is also how "derived" LogLevels are created. Here are the steps to creating a "derived" LogLevel:

  1. Create a LogLevel constant (greater than 0)
  2. Define a string to represent that constant
  3. Implement a LogLevelToStringMethod method.
  4. Implement a StringToLogLevelMethod method.
  5. create a "static initializer" that registers those 2 methods with the LogLevelManager singleton.

Class Documentation

struct dcmtk::log4cplus::LogLevelManager::LogLevelToStringMethodRec
Class Members
union LogLevelToStringMethodRec __unnamed__
bool use_1_0
union dcmtk::log4cplus::LogLevelManager::LogLevelToStringMethodRec.__unnamed__
Class Members
LogLevelToStringMethod func
LogLevelToStringMethod_1_0 func_1_0

Member Function Documentation

LogLevel dcmtk::log4cplus::LogLevelManager::fromString ( const log4cplus::tstring s) const

This method is called by all classes internally to log4cplus to convert a string into a LogLevel.

Note: It traverses the list of StringToLogLevelMethod to do this, so all "derived" LogLevels are recognized as well.

void dcmtk::log4cplus::LogLevelManager::pushFromStringMethod ( StringToLogLevelMethod  newFromString)

When creating a "derived" LogLevel, a StringToLogLevelMethod should be defined and registered with the LogLevelManager by calling this method.

See Also
pushToStringMethod
void dcmtk::log4cplus::LogLevelManager::pushToStringMethod ( LogLevelToStringMethod  newToString)

When creating a "derived" LogLevel, a LogLevelToStringMethod should be defined and registered with the LogLevelManager by calling this method.

See Also
pushFromStringMethod
log4cplus::tstring const& dcmtk::log4cplus::LogLevelManager::toString ( LogLevel  ll) const

This method is called by all Layout classes to convert a LogLevel into a string.

Note: It traverses the list of LogLevelToStringMethod to do this, so all "derived" LogLevels are recognized as well.


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


Generated on Tue Nov 26 2013 for DCMTK Version 3.6.1 20131114 by Doxygen 1.8.5