62 std::memset(_traceStack, 0, _numBufBytes);
63 std::memset(_traceList, 0, _numBufBytes);
114 _traceStackTop =
static_cast<INDEXTYPE>((_traceStackTop - 1) & _bufferIndexMask);
118 _traceStack[_traceStackTop] =
NULL;
149 enum { _numBufEntries = (1L << (
sizeof(
INDEXTYPE) << 3)) ,
150 _numBufBytes = _numBufEntries *
sizeof(
const char *),
151 _bufferIndexMask = _numBufEntries - 1
161 const char *_traceStack[_numBufEntries];
164 const char *_traceList[_numBufEntries];
181 template <
typename INDEXTYPE>
class Trace {
This class manages a list and a stack of pointers to permanent strings.
TraceBuffer()
Initializing constructor.
const char *const * getTraceList() const
Returns the pointer to the first element of the trace list.
INDEXTYPE getTraceListEnd() const
Returns index into trace list buffer.
void add(const char *const traceInString)
Adds an element.
INDEXTYPE getTraceStackTop() const
Returns index into trace stack buffer.
const char *const * getTraceStack() const
Returns the pointer to the first element of the trace stack.
This class simply implements a constructor and a destructor.
Trace(const char *const traceInString, TraceBuffer< INDEXTYPE > &traceBuf)
Constructor.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#define ML_UTILS_EXPORT
Defines platform dependent DLL export macro for mlUtils.
ML_UTILS_EXPORT TraceBuffer< MLGlobalTraceBufferType > MLGlobalTraceBuffer
This is a global singleton of the TraceBuffer class.
MLuint16 MLGlobalTraceBufferType
The type used in the MLGlobalTraceBuffer.