Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitk::PseudoLogStream Class Reference

Simulates a std::cout stream. More...

#include <mitkLog.h>

Collaboration diagram for mitk::PseudoLogStream:

Public Member Functions

 PseudoLogStream (LogLevel level, const std::string &filePath, int lineNumber, const std::string &functionName)
 
 ~PseudoLogStream ()
 The encapsulated message is written to the backend. More...
 
template<class T >
PseudoLogStreamoperator<< (const T &data)
 
template<class T >
PseudoLogStreamoperator<< (T &data)
 
PseudoLogStreamoperator<< (std::ostream &(*func)(std::ostream &))
 
PseudoLogStreamoperator() (const std::string &category)
 Sets the category of this PseudoLogStream object. More...
 
PseudoLogStreamoperator() (bool enabled)
 Enables/disables the PseudoLogStream. More...
 

Protected Attributes

bool m_Disabled
 
LogMessage m_Message
 
std::stringstream m_Stream
 

Detailed Description

Simulates a std::cout stream.

Should only be used by the macros defined in the file mitkLog.h.

Definition at line 67 of file mitkLog.h.

Constructor & Destructor Documentation

◆ PseudoLogStream()

mitk::PseudoLogStream::PseudoLogStream ( LogLevel  level,
const std::string &  filePath,
int  lineNumber,
const std::string &  functionName 
)
inline

Definition at line 70 of file mitkLog.h.

◆ ~PseudoLogStream()

mitk::PseudoLogStream::~PseudoLogStream ( )
inline

The encapsulated message is written to the backend.

Definition at line 79 of file mitkLog.h.

References mitk::DistributeToBackends(), and MITKLOG_MODULENAME.

Member Function Documentation

◆ operator()() [1/2]

PseudoLogStream& mitk::PseudoLogStream::operator() ( bool  enabled)
inline

Enables/disables the PseudoLogStream.

If set to false, parsing and output is suppressed.

Definition at line 160 of file mitkLog.h.

◆ operator()() [2/2]

PseudoLogStream& mitk::PseudoLogStream::operator() ( const std::string &  category)
inline

Sets the category of this PseudoLogStream object.

If there is already a category it is appended, separated by a dot.

Definition at line 143 of file mitkLog.h.

◆ operator<<() [1/3]

template<class T >
PseudoLogStream& mitk::PseudoLogStream::operator<< ( const T &  data)
inline

Definition at line 90 of file mitkLog.h.

◆ operator<<() [2/3]

PseudoLogStream& mitk::PseudoLogStream::operator<< ( std::ostream &(*)(std::ostream &)  func)
inline

Definition at line 123 of file mitkLog.h.

◆ operator<<() [3/3]

template<class T >
PseudoLogStream& mitk::PseudoLogStream::operator<< ( T &  data)
inline

Definition at line 107 of file mitkLog.h.

Member Data Documentation

◆ m_Disabled

bool mitk::PseudoLogStream::m_Disabled
protected

Definition at line 167 of file mitkLog.h.

◆ m_Message

LogMessage mitk::PseudoLogStream::m_Message
protected

Definition at line 168 of file mitkLog.h.

◆ m_Stream

std::stringstream mitk::PseudoLogStream::m_Stream
protected

Definition at line 169 of file mitkLog.h.


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