Open Inventor Reference
SoTrace< INDEXTYPE > Class Template Reference

This class simply implements a constructor and a destructor. More...

#include <Inventor/SoTrace.h>

Public Member Functions

 SoTrace (const char *const traceInString, SoTraceBuffer< INDEXTYPE > &traceBuf)
 Constructor. More...
 
 ~SoTrace ()
 Destructor. More...
 

Detailed Description

template<typename INDEXTYPE>
class SoTrace< INDEXTYPE >

The constructor calls the add method of a SoTraceBuffer and the destructor calls the remove method of a SoTraceBuffer. It will typically be called of SO_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 SoTraceBuffer object. INDEXTYPE specifies the data type and indirectly the size of the stack and the list. Normally it should be uint8_t or uint16_t which then will result in 256 or 65536 stack and list entries. Other types are not supported.

Definition at line 311 of file SoTrace.h.

Constructor & Destructor Documentation

◆ SoTrace()

template<typename INDEXTYPE >
SoTrace< INDEXTYPE >::SoTrace ( const char *const  traceInString,
SoTraceBuffer< INDEXTYPE > &  traceBuf 
)
inline

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 SO_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!

Push string addres on stack and at end of trace list.

Definition at line 325 of file SoTrace.h.

References SoTraceBuffer< INDEXTYPE >::add().

◆ ~SoTrace()

template<typename INDEXTYPE >
SoTrace< INDEXTYPE >::~SoTrace ( )
inline

It removes the last entry from the SoTraceBuffer. 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!

Definition at line 336 of file SoTrace.h.


The documentation for this class was generated from the following file: