MeVisLab Toolbox Reference
|
This class simply implements a constructor and a destructor. More...
#include <mlTrace.h>
Public Member Functions | |
Trace (const char *const traceInString, TraceBuffer< INDEXTYPE > &traceBuf) | |
Constructor. | |
~Trace () | |
Destructor. | |
This class simply implements a constructor and a destructor.
The constructor calls the add method of a TraceBuffer and the destructor calls the remove method of a TraceBuffer. It will typically be called of ML_TRACE_IN macros on function entries to track the string description of the function name in a call stack and a call list in a TraceBuffer object.
INDEXTYPE | specifies the data type and indirectly the size of the stack and the list. Normally it should be MLuint8 or MLuint16 which then will result in 256 or 65536 stack and list entries. Other types are supported. IMPORTANT: For further documentation and thread-safety see TraceBuffer class! |
|
inline |
Constructor.
It adds the passed string reference to the trace buffer and to the top of the trace stack. Passed string pointer also may be NULL. If not NULL it must point to any null-terminated non changing permanent string. To be used by ML_TRACE_IN macros.
traceInString | is the string pointer to the permanent static string to be added to list and pushed to stack. |
traceBuf | is the TraceBuffer in which the string shall be appended and pushed. VERY TIME CRITICAL! |
Definition at line 196 of file mlTrace.h.
References mlrange_cast().
Destructor.
It removes the last entry from the TraceBuffer. That pops the last pushed string reference from the stack and resets its entry to NULL. Normally automatically called when leaving the scope where the constructor is called. VERY TIME CRITICAL!