Conjecture::Debug Class Reference

#include <Debug.h>

Inheritance diagram for Conjecture::Debug:

Conjecture::Root List of all members.

Detailed Description

Debug class.


Public Types

enum  verboseLevel {
  DEBUG_LEVEL_NONE = 0x00, DEBUG_LEVEL_ERROR = 0x01, DEBUG_LEVEL_WARNING = 0x02, DEBUG_LEVEL_INFO = 0x04,
  DEBUG_LEVEL_IMAGES_BASIC = 0x40, DEBUG_LEVEL_IMAGES_FULL = 0x80, DEBUG_LEVEL_ALL = 0xFF
}

Public Member Functions

void setLogStream (std::ostream &s)
void toggleLevel (verboseLevel l)
void untoggleLevel (verboseLevel l)
void setLevel (verboseLevel l)
bool isInLevel (verboseLevel l)
virtual void header (verboseLevel l)
virtual Debugoperator<< (const std::string &str)
virtual Debugoperator<< (const char *str)

Static Public Member Functions

static DebuggetHandle (void)

Protected Member Functions

std::ostream * outStream ()
const char * levelToString (verboseLevel l) const

Protected Attributes

verboseLevel _level


Member Enumeration Documentation

enum Conjecture::Debug::verboseLevel
 

Verbose levels.

Enumerator:
DEBUG_LEVEL_NONE  No output.
DEBUG_LEVEL_ERROR  Print errors.
DEBUG_LEVEL_WARNING  Print warnings.
DEBUG_LEVEL_INFO  Print information.
DEBUG_LEVEL_IMAGES_BASIC  Output basic images.
DEBUG_LEVEL_IMAGES_FULL  Output all images.
DEBUG_LEVEL_ALL  Output everything.


Member Function Documentation

static Debug& Conjecture::Debug::getHandle void   )  [inline, static]
 

Singleton access method.

Returns:
A reference to this singleton.

void Debug::header verboseLevel  l  )  [virtual]
 

Prints a header with standard information.

Parameters:
l The verbose level of this message.

bool Conjecture::Debug::isInLevel verboseLevel  l  )  [inline]
 

Checks if a given level should be printed.

Returns:
A boolean value.

const char* Conjecture::Debug::levelToString verboseLevel  l  )  const [inline, protected]
 

Converts a verboseLevel to a string.

Parameters:
l The level.
Returns:
The name of that level.

Debug & Debug::operator<< const char *  str  )  [virtual]
 

Overloads << operator.

Parameters:
str The character string to output, ended by \0.
Returns:
A reference to this class.

Debug & Debug::operator<< const std::string &  str  )  [virtual]
 

Overloads << operator.

Parameters:
str The std::string to output.
Returns:
A reference to this class.

std::ostream* Conjecture::Debug::outStream  )  [inline, protected]
 

Accessor for the outStream field.

void Conjecture::Debug::setLevel verboseLevel  l  )  [inline]
 

Sets verbose flags.

Parameters:
l The flags to toggle.

void Conjecture::Debug::setLogStream std::ostream &  s  )  [inline]
 

Sets the target log stream.

Parameters:
s The std::stream to use for output.

void Conjecture::Debug::toggleLevel verboseLevel  l  )  [inline]
 

Toggles verbose flags.

Parameters:
l The flags to toggle.

void Conjecture::Debug::untoggleLevel verboseLevel  l  )  [inline]
 

Untoggles verbose flags.

Parameters:
l The flags to toggle.


Member Data Documentation

verboseLevel Conjecture::Debug::_level [protected]
 

Current flags


The documentation for this class was generated from the following files:
Generated on Thu Jun 15 19:56:11 2006 for Conjecture by  doxygen 1.4.6