Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::DefaultFormatter Class Reference

The default formatter used to turn log messages into a human-readable form. More...

#include <mitsuba/core/formatter.h>

+ Inheritance diagram for mitsuba::DefaultFormatter:

Public Member Functions

 DefaultFormatter ()
 Create a new default formatter. More...
 
std::string format (ELogLevel logLevel, const Class *theClass, const Thread *thread, const std::string &text, const char *file, int line)
 Turn a log message into a human-readable format. More...
 
void setHaveDate (bool value)
 Should date information be included? The default is yes. More...
 
void setHaveThread (bool value)
 Should thread information be included? The default is yes. More...
 
void setHaveLogLevel (bool value)
 Should log level information be included? The default is yes. More...
 
void setHaveClass (bool value)
 Should class information be included? The default is yes. More...
 
virtual const ClassgetClass () const
 Retrieve this object's class. More...
 
- Public Member Functions inherited from Object
 Object ()
 Construct a new object. More...
 
int getRefCount () const
 Return the current reference count. More...
 
void incRef () const
 Increase the reference count of the object by one. More...
 
void decRef (bool autoDeallocate=true) const
 Decrease the reference count of the object and possibly deallocate it. More...
 
virtual std::string toString () const
 Return a human-readable string representation of the object's contents. More...
 

Static Public Attributes

static Classm_theClass
 
- Static Public Attributes inherited from mitsuba::Formatter
static Classm_theClass
 
- Static Public Attributes inherited from Object
static Classm_theClass
 Pointer to the object's class descriptor. More...
 

Protected Member Functions

virtual ~DefaultFormatter ()
 Virtual destructor. More...
 
- Protected Member Functions inherited from mitsuba::Formatter
virtual ~Formatter ()
 Virtual destructor. More...
 
- Protected Member Functions inherited from Object
virtual ~Object ()
 Virtual private deconstructor. (Will only be called by ref) More...
 

Protected Attributes

bool m_haveDate
 
bool m_haveLogLevel
 
bool m_haveThread
 
bool m_haveClass
 

Friends

class Logger
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static void staticInitialization ()
 Initializes the built-in reference count debugger (if enabled) More...
 
static void staticShutdown ()
 Free the memory taken by staticInitialization() More...
 

Detailed Description

The default formatter used to turn log messages into a human-readable form.

Constructor & Destructor Documentation

mitsuba::DefaultFormatter::DefaultFormatter ( )

Create a new default formatter.

virtual mitsuba::DefaultFormatter::~DefaultFormatter ( )
inlineprotectedvirtual

Virtual destructor.

Member Function Documentation

std::string mitsuba::DefaultFormatter::format ( ELogLevel  logLevel,
const Class theClass,
const Thread thread,
const std::string &  text,
const char *  file,
int  line 
)
virtual

Turn a log message into a human-readable format.

Parameters
logLevelThe importance of the debug message
theClassOriginating class or NULL
threadThread, which is reponsible for creating the message
textText content associated with the log message
fileFile, which is responsible for creating the message
lineAssociated line within the source file

Implements mitsuba::Formatter.

virtual const Class* mitsuba::DefaultFormatter::getClass ( ) const
virtual

Retrieve this object's class.

Reimplemented from mitsuba::Formatter.

void mitsuba::DefaultFormatter::setHaveClass ( bool  value)
inline

Should class information be included? The default is yes.

void mitsuba::DefaultFormatter::setHaveDate ( bool  value)
inline

Should date information be included? The default is yes.

void mitsuba::DefaultFormatter::setHaveLogLevel ( bool  value)
inline

Should log level information be included? The default is yes.

void mitsuba::DefaultFormatter::setHaveThread ( bool  value)
inline

Should thread information be included? The default is yes.

Friends And Related Function Documentation

friend class Logger
friend

Member Data Documentation

bool mitsuba::DefaultFormatter::m_haveClass
protected
bool mitsuba::DefaultFormatter::m_haveDate
protected
bool mitsuba::DefaultFormatter::m_haveLogLevel
protected
bool mitsuba::DefaultFormatter::m_haveThread
protected
Class* mitsuba::DefaultFormatter::m_theClass
static

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