TRC Library for FRC (2011) 2011
TRC Library Code Project

DbgTrace Class Reference

#include <DbgTrace.h>

List of all members.

Public Member Functions

 DbgTrace (void)
virtual ~DbgTrace (void)
void Initialize (__in UINT32 traceModules, __in UINT32 traceLevel, __in UINT32 msgLevel)
void FuncPrefix (__in const char *pszMod, __in const char *pszFunc, __in bool fEnter, __in bool fNewLine)
void MsgPrefix (__in const char *pszMod, __in const char *pszFunc, __in UINT32 msgLevel)

Public Attributes

bool m_fTraceEnabled
UINT32 m_traceModules
UINT32 m_traceLevel
UINT32 m_msgLevel
UINT32 m_traceTime

Detailed Description

This class implements the debug tracing object. It provides two facilities. One allows the functions to trace the enter and exit conditions of the call by dumping the calling parameters of function entry and the return value of function exit. The other one allows the function to print out different level of messages such as fatal message, error message, warning message, info message and verbose message etc.

Definition at line 186 of file DbgTrace.h.


Constructor & Destructor Documentation

DbgTrace::DbgTrace ( void  ) [inline]

Constructor for the DbgTrace object.

Definition at line 202 of file DbgTrace.h.

virtual DbgTrace::~DbgTrace ( void  ) [inline, virtual]

Destructor for the DbgTrace object.

Definition at line 218 of file DbgTrace.h.


Member Function Documentation

void DbgTrace::FuncPrefix ( __in const char *  pszMod,
__in const char *  pszFunc,
__in bool  fEnter,
__in bool  fNewLine 
) [inline]

This method generates the function trace prefix string. The prefix contains the indentation, the module name and the function name.

Parameters:
pszModSpecifies the name of the module.
pszFuncSpecifies the name of the function.
fEnterSpecifies whether we are entering or exiting the function.
fNewLineSpecifies whether we will print a new line.

Definition at line 259 of file DbgTrace.h.

void DbgTrace::Initialize ( __in UINT32  traceModules,
__in UINT32  traceLevel,
__in UINT32  msgLevel 
) [inline]

This function initializes the tracing module with the specified module IDs and trace levels.

Parameters:
traceModulesBit mask specifying which modules to enable tracing with. Each module is assigned a bit ID in the bit mask.
traceLevelSpecifies the function trace level at or below which function tracing is enabled.
msgLevelSpecifies the message trace level at or below which message tracing is enabled.

Definition at line 236 of file DbgTrace.h.

void DbgTrace::MsgPrefix ( __in const char *  pszMod,
__in const char *  pszFunc,
__in UINT32  msgLevel 
) [inline]

This method generates the message trace prefix string. The prefix contains the module and function names as well as message level info in which the message is printed.

Parameters:
pszModSpecifies the name of the module.
pszFuncSpecifies the name of the function.
msgLevelSpecifies message level.

Definition at line 299 of file DbgTrace.h.


Member Data Documentation

Definition at line 189 of file DbgTrace.h.

Definition at line 192 of file DbgTrace.h.

Definition at line 191 of file DbgTrace.h.

Definition at line 190 of file DbgTrace.h.

Definition at line 193 of file DbgTrace.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Defines