dlvhex  2.5.0
Logger::Closure Class Reference

Allows for printing within a given scope using some indent. More...

#include <include/dlvhex2/Logger.h>

Collaboration diagram for Logger::Closure:

Public Member Functions

 Closure (Logger &l, Levels level, const std::string &str, bool message)
 Generic constructor.
 Closure (Logger &l, Levels level, const std::string &str, const void *const val, bool message)
 Constructor.
 ~Closure ()
 Destructor.

Private Member Functions

void sayHello ()
 Prints an ENTRY message.
void sayGoodbye ()
 Prints an EXIT message.

Private Attributes

Loggerl
 Logger to use.
Levels level
 Level to print at.
unsigned cutoff
 Value to be removed from the indent after the scope was left (restore the old indent).
bool message
 Message to print.

Detailed Description

Allows for printing within a given scope using some indent.

Definition at line 159 of file Logger.h.


Constructor & Destructor Documentation

Logger::Closure::Closure ( Logger l,
Levels  level,
const std::string &  str,
bool  message 
) [inline]

Generic constructor.

With value (converted/reinterpret-casted to const void* const).

Parameters:
lSee Logger::Closure::l.
levelSee Logger::Closure::level.
strString to print.
messageSee Logger::Closure::message.

Definition at line 197 of file Logger.h.

References Logger::indent, LOG_SCOPED_LOCK, and Logger::shallPrint().

Logger::Closure::Closure ( Logger l,
Levels  level,
const std::string &  str,
const void *const  val,
bool  message 
) [inline]

Constructor.

With value (converted/reinterpret-casted to const void* const).

Parameters:
lSee Logger::Closure::l.
levelSee Logger::Closure::level.
strString to print.
valValue to print.
messageSee Logger::Closure::message.

Definition at line 217 of file Logger.h.

References Logger::indent, LOG_SCOPED_LOCK, and Logger::shallPrint().

Destructor.

Definition at line 232 of file Logger.h.

References LOG_SCOPED_LOCK.


Member Function Documentation

void Logger::Closure::sayGoodbye ( ) [inline, private]

Prints an EXIT message.

Definition at line 181 of file Logger.h.

void Logger::Closure::sayHello ( ) [inline, private]

Prints an ENTRY message.

Definition at line 172 of file Logger.h.


Field Documentation

unsigned Logger::Closure::cutoff [private]

Value to be removed from the indent after the scope was left (restore the old indent).

Definition at line 167 of file Logger.h.

Logger to use.

Definition at line 163 of file Logger.h.

Level to print at.

Definition at line 165 of file Logger.h.

bool Logger::Closure::message [private]

Message to print.

Definition at line 169 of file Logger.h.


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