Guiliani  Version 2.4 revision 5970 (build 3)
CGUITrace Class Reference

Guiliani Trace component for platform independent logging of debug/error information to various targets. More...

#include <GUITrace.h>

Inheritance diagram for CGUITrace:

Public Types

enum  GUITraceActivation_t { GUITRACE_NOT_ACTIVE = 0, GUITRACE_ACTIVE = 1 }
 

Public Member Functions

 ~CGUITrace ()
 
void CreateDebuggerTrace ()
 
void CreateFileTrace (const eC_String &TraceFileName)
 
void CreateStdOutTrace ()
 
GUITraceActivation_t GetTraceActive ()
 
void Log (const eC_String &rkLogStr, const eC_String &rkOutputStr, const eC_String &rkFileName="", const eC_String &rkLineNumber="")
 
void SetTraceActive (GUITraceActivation_t eTraceActive)
 
- Public Member Functions inherited from CGUISubject
 CGUISubject ()
 Default constructor.
 
virtual ~CGUISubject ()
 Default destructor.
 
void AddObserver (CGUIObserver *pObserver)
 
void ClearObservers ()
 Removes all observers from the internal list.
 
const eC_TListDoubleLinked< CGUIObserver * > & GetObserverList () const
 
void NotifyObservers ()
 
void NotifyObservers (const eC_String &kMessage)
 
void NotifyObservers (const CGUIObject *const pkUpdatedObject)
 
void NotifyObservers (const CGUIValue &kObservedValue, const CGUIObject *const pkUpdatedObject, const eC_UInt uiX=0, const eC_UInt uiY=0)
 
void RemoveObserver (CGUIObserver *pObserver)
 

Static Public Member Functions

static CGUITraceGetInstance ()
 
static void PrintObjectTree (CGUIObject *pObj)
 

Detailed Description

Guiliani Trace component for platform independent logging of debug/error information to various targets.

Please refer to the module "Debugging" for detailed information.

See also
Debugging

Member Enumeration Documentation

◆ GUITraceActivation_t

Definition of enum values for de/activation of logging output at runtime.

Enumerator
GUITRACE_ACTIVE 

Messages will not be logged.

Constructor & Destructor Documentation

◆ ~CGUITrace()

CGUITrace::~CGUITrace ( )

Destructor. Needs to be public because else the Pocket PC compiler does not like it.

Member Function Documentation

◆ CreateDebuggerTrace()

void CGUITrace::CreateDebuggerTrace ( )

Creates a CDebuggerTrace object, which logs all messages to the VisualStudio debugger window.

◆ CreateFileTrace()

void CGUITrace::CreateFileTrace ( const eC_String &  TraceFileName)

Creates a CFileTrace object, which logs all messages to the given logfile.

Parameters
TraceFileNameName of the log file to be written.

◆ CreateStdOutTrace()

void CGUITrace::CreateStdOutTrace ( )

Creates a CStdOutTrace object, which logs all messages to StdOut.

◆ GetInstance()

static CGUITrace& CGUITrace::GetInstance ( )
inlinestatic

CGUITrace is a Singleton class, i.e. only one instance of it can be created. GetInstance is the method that returns a reference to this instance.

Returns
The only instance of CGUITrace.

◆ GetTraceActive()

CGUITrace::GUITraceActivation_t CGUITrace::GetTraceActive ( )

Checks if trace output at runtime is activated.

Returns
The current trace activation state.

◆ Log()

void CGUITrace::Log ( const eC_String &  rkLogStr,
const eC_String &  rkOutputStr,
const eC_String &  rkFileName = "",
const eC_String &  rkLineNumber = "" 
)

Logs a message by notifying all observers. The log message consists of two strings and, optionally, the calling location (file and line number from which this method was called).

Parameters
rkLogStrText before the log message.
rkOutputStrLog message.
rkFileNameName of the file from which this method was called.
rkLineNumberLine number from which this method was called.

◆ PrintObjectTree()

void CGUITrace::PrintObjectTree ( CGUIObject pObj)
static

Print the hierarchy of the passed object. If the object is not a composite object, it prints the hierarchy of the parent of this object.

Parameters
pObjpointer to an object or composite object

◆ SetTraceActive()

void CGUITrace::SetTraceActive ( GUITraceActivation_t  eTraceActive)

De/Activates trace output at runtime. If tracing is activated this switch enables the user to dimiss the trace messages before being written to the output.

Parameters
eTraceActiveGUITRACE_NOT_ACTIVE or GUITRACE_ACTIVE to deactivate or activate tracing.

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