Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mbilog Namespace Reference

Classes

class  BackendBase
 This class is an interface for logging backends that can be registered in the mbi logging mechanism. More...
 
class  BackendCout
 Default backend of the mbi logging mechanism. This backend is used if no other backend is registered. The backend formats the logging messages to a normal string and writes them to std::cout. More...
 
class  LogMessage
 An object of this class represents a single logging message (logging event) of the mbi logging mechanism. Logging message should only be generated by the macros in the class mbilog.h. More...
 
class  NullStream
 An object of this class simulates a std::cout stream but does nothing. This class is for dummy objects, bit shift operators are availiable but doing nothing. Should only be used by the macros defined in the file mbilog.h. More...
 
class  PseudoStream
 An object of this class simulates a std::cout stream. This means messages can be added by using the bit shift operator (<<). Should only be used by the macros defined in the file mbilog.h. More...
 
class  TextBackendBase
 This class is an abstract superclass for logging text backends. It adds string formatting methods to the backend interface BackendBase. Accordingly backends that inherit from this class can be registered in the mbi logging mechanism. More...
 

Enumerations

enum  {
  Info, Warn, Error, Fatal,
  Debug
}
 This enum defines the message/event levels of the mbi logging mechanism. Info: TODO Warn: TODO Error: TODO Fatal: TODO Debug: TODO. More...
 

Functions

void MBILOG_EXPORT RegisterBackend (BackendBase *backend)
 Registeres a backend to the mbi logging mechanism. If a backend is registered here, all mbilog messages are relayed to this backend through the method ProcessMessage. If no backend is registered the default backend is used. More...
 
void MBILOG_EXPORT UnregisterBackend (BackendBase *backend)
 Unregisters a backend. More...
 
void MBILOG_EXPORT DistributeToBackends (LogMessage &l)
 Distributes the given message to all registered backends. Should only be called by objects of the class pseudo stream. More...
 
void MBILOG_EXPORT EnableBackends (OutputType type)
 
void MBILOG_EXPORT DisableBackends (OutputType type)
 
bool MBILOG_EXPORT IsBackendEnabled (OutputType type)
 

Variables

static const std::string NA_STRING
 
static const char * replace []
 This is a dictionary to replace long names of classes, modules, etc. to shorter versions in the console output. More...
 

Enumeration Type Documentation

anonymous enum

This enum defines the message/event levels of the mbi logging mechanism. Info: TODO Warn: TODO Error: TODO Fatal: TODO Debug: TODO.

Enumerator
Info 
Warn 
Error 
Fatal 
Debug 

Definition at line 29 of file mbilogLoggingTypes.h.

Function Documentation

void mbilog::DisableBackends ( OutputType  type)

Disable the output of a backend.

Definition at line 79 of file mbilog.cpp.

void mbilog::DistributeToBackends ( mbilog::LogMessage l)

Distributes the given message to all registered backends. Should only be called by objects of the class pseudo stream.

Definition at line 40 of file mbilog.cpp.

References IsBackendEnabled(), mbilog::LogMessage::message, mbilog::BackendCout::ProcessMessage(), RegisterBackend(), mbilog::BackendCout::SetFull(), and UnregisterBackend().

Referenced by mbilog::PseudoStream::~PseudoStream().

void mbilog::EnableBackends ( OutputType  type)

Enable the output of a backend.

Definition at line 74 of file mbilog.cpp.

bool mbilog::IsBackendEnabled ( OutputType  type)

Checks wether the output of this backend is enabled.

Definition at line 84 of file mbilog.cpp.

Referenced by DistributeToBackends().

void mbilog::RegisterBackend ( mbilog::BackendBase backend)

Registeres a backend to the mbi logging mechanism. If a backend is registered here, all mbilog messages are relayed to this backend through the method ProcessMessage. If no backend is registered the default backend is used.

Definition at line 30 of file mbilog.cpp.

Referenced by DistributeToBackends(), and mitk::LoggingBackend::Register().

void mbilog::UnregisterBackend ( mbilog::BackendBase backend)

Unregisters a backend.

Definition at line 35 of file mbilog.cpp.

Referenced by DistributeToBackends(), and mitk::LoggingBackend::Unregister().

Variable Documentation

const std::string mbilog::NA_STRING
static

Definition at line 27 of file mbilog.cpp.

const char* mbilog::replace[]
static

This is a dictionary to replace long names of classes, modules, etc. to shorter versions in the console output.

Definition at line 24 of file mbilogTextDictionary.h.

Referenced by mitk::DICOMTagsOfInterestService::AddTagOfInterest(), mitk::USCombinedModality::GetCalibration(), mitk::USCombinedModality::GetIdentifierForCurrentProbe(), main(), mitk::ItkImageIO::Read(), and mitk::USCombinedModality::RemoveCalibration().