Minimalist debugging class.
More...
#include <Debug.h>
Minimalist debugging class.
- Author
- Julien Tierny julie.nosp@m.n.ti.nosp@m.erny@.nosp@m.lip6.nosp@m..fr
- Date
- February 2011.
Debug provides a few mechanisms to handle debugging messages at a global and local scope, time and memory measurements, etc. Each wtfit class should inheritate from it.
Enumerator |
---|
fatalMsg |
|
timeMsg |
|
memoryMsg |
|
infoMsg |
|
detailedInfoMsg |
|
advancedInfoMsg |
|
const int Debug::dMsg |
( |
ostream & |
stream, |
|
|
string |
msg, |
|
|
const int & |
debugLevel = infoMsg |
|
) |
| const |
|
virtual |
Send a debug message to a stream with a priority debugLevel (lower means higher priority). If the global debug level for the program is set to 0, the program should be completely quiet. So the '0' priority should only be reserved for fatal errors.
- Parameters
-
stream | Output stream. |
msg | Debug message (can contain std::endl characters). |
debugLevel | Priority of the message. |
- Returns
- Returns 0 upon success, negative values otherwise.
- See also
- msg(), err()
const int Debug::err |
( |
const string |
msg, |
|
|
const int & |
debugLevel = infoMsg |
|
) |
| const |
Wrapper for dMsg() that sends a debug message to the standard error output stream.
- Returns
- Returns 0 upon success, negative values otherwise.
- See also
- dMsg(), msg()
const int Debug::msg |
( |
const char * |
msg, |
|
|
const int & |
debugLevel = infoMsg |
|
) |
| const |
Wrapper for dMsg() that sends a debug message to the standard output stream.
- Returns
- Returns 0 upon success, negative values otherwise.
- See also
- dMsg(), msg()
const int Debug::setDebugLevel |
( |
const int & |
debugLevel | ) |
|
|
virtual |
Set the debug level of a particular object. The global variable globalDebugLevel_ will over-ride this setting if it has a lower value.
- Returns
- Returns 0 upon success, negative values otherwise.
int wtfit::Debug::setThreadNumber |
( |
const int |
threadNumber | ) |
|
|
inline |
int Debug::setWrapper |
( |
const Wrapper * |
wrapper | ) |
|
Specify a pointer to a calling object that wraps the current class deriving from wtfit::Debug.
This function is useful to pass the execution context (debug level, number of threads, etc.) from a wrapper to a baseCode object.
- Parameters
-
wrapper | Pointer to the wrapping object. |
- Returns
- Returns 0 upon success, negative values otherwise.
- See also
- vtkBlank
int wtfit::Debug::debugLevel_ |
|
mutableprotected |
bool wtfit::Debug::lastObject_ |
|
protected |
int wtfit::Debug::threadNumber_ |
|
mutableprotected |
The documentation for this class was generated from the following files: