Drag[en]gine Game Engine
1.21
|
Error Trace. More...
#include <deErrorTrace.h>
Public Member Functions | |
Constructors and Destructors | |
deErrorTrace () | |
Create new error trace object. More... | |
~deErrorTrace () | |
Clean up error trace object. More... | |
Management | |
const decString & | GetError () const |
Error. More... | |
void | SetError (const char *error) |
Set error. More... | |
void | Clear () |
Clears the error trace. More... | |
Trace Point Management | |
bool | HasPoints () const |
Determines if there exist trace points. More... | |
bool | IsEmpty () const |
Trace is empty. More... | |
int | GetPointCount () const |
Count of trace points. More... | |
deErrorTracePoint * | GetPoint (int index) const |
Indexed trace point. More... | |
void | AddPoint (deErrorTracePoint *point) |
Adds a new trace point. More... | |
void | RemoveAllPoints () |
Removes all trace points. More... | |
Convenience Functions | |
deErrorTracePoint * | AddAndSetIfEmpty (const char *error, deLoadableModule *sourceModule, const char *sourceFunc, int sourceLine) |
Add given error to the trace and sets the error if there exists no trace point yet. More... | |
deErrorTracePoint * | AddPoint (deLoadableModule *sourceModule, const char *sourceFunc, int sourceLine) |
Add new trace point with the given information. More... | |
void | PrintTrace (deLogger &logger) |
Print error trace out to the given logger. More... | |
Error Trace.
An Error Trace object contains a list of Error Trace Point objects. describing the path of an error that occurred in the engine.
deErrorTrace::deErrorTrace | ( | ) |
Create new error trace object.
deErrorTrace::~deErrorTrace | ( | ) |
Clean up error trace object.
deErrorTracePoint* deErrorTrace::AddAndSetIfEmpty | ( | const char * | error, |
deLoadableModule * | sourceModule, | ||
const char * | sourceFunc, | ||
int | sourceLine | ||
) |
Add given error to the trace and sets the error if there exists no trace point yet.
Returns the new trace point if added or NULL otherwise.
void deErrorTrace::AddPoint | ( | deErrorTracePoint * | point | ) |
Adds a new trace point.
deErrorTracePoint* deErrorTrace::AddPoint | ( | deLoadableModule * | sourceModule, |
const char * | sourceFunc, | ||
int | sourceLine | ||
) |
Add new trace point with the given information.
void deErrorTrace::Clear | ( | ) |
Clears the error trace.
|
inline |
Error.
deErrorTracePoint* deErrorTrace::GetPoint | ( | int | index | ) | const |
Indexed trace point.
|
inline |
Count of trace points.
|
inline |
Determines if there exist trace points.
|
inline |
Trace is empty.
void deErrorTrace::PrintTrace | ( | deLogger & | logger | ) |
Print error trace out to the given logger.
This is more of a temporary function and should not be used.
void deErrorTrace::RemoveAllPoints | ( | ) |
Removes all trace points.
void deErrorTrace::SetError | ( | const char * | error | ) |
Set error.