All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Brief description of class still missing. More...
#include <Trace.h>
Public Member Functions | |
Trace (const TraceStamp *stamp) | |
~Trace () | |
Static Public Member Functions | |
static std::string | backTrace (const std::vector< const TraceStamp * > *stack) |
static std::vector< const TraceStamp * > * | mainStack () |
Brief description of class still missing.
To get a debug trace of all functions, you can define in an implementation files (.cpp):
GpCoreTools::Trace::Trace | ( | const TraceStamp * | s | ) |
Description of constructor still missing
References GpCoreTools::PThread::currentThread(), and GpCoreTools::PThread::stack().
{ PThread * t=PThread::currentThread(); if(t) { _myStack=t->stack(); _myStack->push_back(s); } else { _myStack=&_mainStack; _myStack->push_back(s); } //printf("[TRACE] %s\n",s->toString().toAscii().data()); //fflush(stdout); }
Description of destructor still missing
{
if(_myStack) {
_myStack->pop_back();
}
}
std::string GpCoreTools::Trace::backTrace | ( | const std::vector< const TraceStamp * > * | stack | ) | [static] |
Referenced by GpCoreTools::CoreApplication::osSignal().
{ std::string list; for(std::vector<const TraceStamp *>::const_iterator it=stack->begin();it!=stack->end();it++) { list += (*it)->toString(); list += "\n"; } return list; }
static std::vector<const TraceStamp *>* GpCoreTools::Trace::mainStack | ( | ) | [inline, static] |
Referenced by GpCoreTools::PThread::stacks().
{return &_mainStack;}