YANE-Framework 1.1.0
Public Member Functions | Protected Member Functions | Protected Attributes

yane::Utils::DebugMasterConsole Class Reference

DebugMaster that writes to a class. More...

Inheritance diagram for yane::Utils::DebugMasterConsole:
Collaboration diagram for yane::Utils::DebugMasterConsole:

List of all members.

Public Member Functions

virtual void addDebugInfo (std::string clientname, std::string message, std::string dataname, void *data, int datasize, int datatype, int level)
 Add some messages and/or data.
 DebugMasterConsole (RTClock *clock, int textwidth=80)
virtual int level ()
 Get current level.
virtual DebugClientnewClient (const char *clientname)
 Creates new DebugClient.
virtual void setLevel (int level)
 Sets a new level.
virtual ~DebugMasterConsole ()

Protected Member Functions

virtual std::string formatData (void *data, int datalength, int datatype, int margin, int textwidth, int doubleprec, bool doublesci)
 Format appended data.

Protected Attributes

int _textwidth

Detailed Description

See also:
DebugMasterTextStream This class extends DebugMasterTextStream to write the textstream to the console.

Constructor & Destructor Documentation

LIB_EXPORT yane::Utils::DebugMasterConsole::DebugMasterConsole ( RTClock clock,
int  textwidth = 80 

This creates the debugmasterconsole object.

clockClock the current program is using.
textwidthWidth after which a line is wrapped.
LIB_EXPORT yane::Utils::DebugMasterConsole::~DebugMasterConsole ( ) [virtual]

Destroys the object.

Member Function Documentation

LIB_EXPORT void yane::Utils::DebugMasterTextStream::addDebugInfo ( std::string  clientname,
std::string  message,
std::string  dataname,
void *  data,
int  datasize,
int  datatype,
int  level 
) [virtual, inherited]

Overwrites the addDebugInfo class from DebugMaster to write the data to a textstream.

clientnameClient from which the debug message was forwarded.
messageDebug message
datanameName of the data
dataPointer to the data
datasizeSize of the data
datatypeType of the data
levelDebug level of the data

Implements yane::Utils::DebugMaster.

LIB_EXPORT string yane::Utils::DebugMaster::formatData ( void *  data,
int  datalength,
int  datatype,
int  margin,
int  textwidth,
int  doubleprec,
bool  doublesci 
) [protected, virtual, inherited]

Formats the appended data of a debug message.

dataPointer to the appended data.
datalengthLength of the data.
datatypeType of the data.
marginSpace after which the message starts.
textwidthWidth after which a line is wrapped.
doubleprecPrecision of a double.
doublesciWether fixed or scientific is used.
Formated string Mutex this object is using.
LIB_EXPORT int yane::Utils::DebugMaster::level ( ) [virtual, inherited]

Get the current level

Current debug level
LIB_EXPORT yane::Utils::DebugClient * yane::Utils::DebugMaster::newClient ( const char *  clientname) [virtual, inherited]

Creates new DebugClient with current master as master.

clientnameName of the client which is displayed in the debug messages.
LIB_EXPORT void yane::Utils::DebugMaster::setLevel ( int  level) [virtual, inherited]

Sets a new level

levelNew debug level

Member Data Documentation

RTClock* yane::Utils::DebugMaster::_clock [protected, inherited]

Current debug level.

Mutex* yane::Utils::DebugMaster::_mutex [protected, inherited]

Clock this object is using.

< Width after which a line is wrapped. Textstream this object is using.