Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

rcContext Class Reference

Provides an interface for optional logging and performance tracking of the Recast build process. More...

#include <Recast.h>

List of all members.

Public Member Functions

void enableLog (bool state)
 Enables or disables logging.
void enableTimer (bool state)
 Enables or disables the performance timers.
int getAccumulatedTime (const rcTimerLabel label) const
 Returns the total accumulated time of the specified performance timer.
void log (const rcLogCategory category, const char *format,...)
 Logs a message.
 rcContext (bool state=true)
 Contructor.
void resetLog ()
 Clears all log entries.
void resetTimers ()
 Clears all peformance timers. (Resets all to unused.)
void startTimer (const rcTimerLabel label)
 Starts the specified performance timer.
void stopTimer (const rcTimerLabel label)
 Stops the specified performance timer.
virtual ~rcContext ()

Protected Member Functions

virtual int doGetAccumulatedTime (const rcTimerLabel) const
 Returns the total accumulated time of the specified performance timer.
virtual void doLog (const rcLogCategory, const char *, const int)
 Logs a message.
virtual void doResetLog ()
 Clears all log entries.
virtual void doResetTimers ()
 Clears all timers. (Resets all to unused.)
virtual void doStartTimer (const rcTimerLabel)
 Starts the specified performance timer.
virtual void doStopTimer (const rcTimerLabel)
 Stops the specified performance timer.

Protected Attributes

bool m_logEnabled
 True if logging is enabled.
bool m_timerEnabled
 True if the performance timers are enabled.

Detailed Description

Provides an interface for optional logging and performance tracking of the Recast build process.

Definition at line 101 of file Recast.h.


Constructor & Destructor Documentation

rcContext::rcContext ( bool  state = true) [inline]

Contructor.

Parameters:
[in]stateTRUE if the logging and performance timers should be enabled. [Default: true]

Definition at line 107 of file Recast.h.

virtual rcContext::~rcContext ( ) [inline, virtual]

Definition at line 108 of file Recast.h.


Member Function Documentation

virtual int rcContext::doGetAccumulatedTime ( const rcTimerLabel  ) const [inline, protected, virtual]

Returns the total accumulated time of the specified performance timer.

Parameters:
[in]labelThe category of the timer.
Returns:
The accumulated time of the timer, or -1 if timers are disabled or the timer has never been started.

Definition at line 167 of file Recast.h.

virtual void rcContext::doLog ( const rcLogCategory  ,
const char *  ,
const int   
) [inline, protected, virtual]

Logs a message.

Parameters:
[in]categoryThe category of the message.
[in]msgThe formatted message.
[in]lenThe length of the formatted message.

Definition at line 151 of file Recast.h.

virtual void rcContext::doResetLog ( ) [inline, protected, virtual]

Clears all log entries.

Definition at line 145 of file Recast.h.

virtual void rcContext::doResetTimers ( ) [inline, protected, virtual]

Clears all timers. (Resets all to unused.)

Definition at line 154 of file Recast.h.

virtual void rcContext::doStartTimer ( const rcTimerLabel  ) [inline, protected, virtual]

Starts the specified performance timer.

Parameters:
[in]labelThe category of timer.

Definition at line 158 of file Recast.h.

virtual void rcContext::doStopTimer ( const rcTimerLabel  ) [inline, protected, virtual]

Stops the specified performance timer.

Parameters:
[in]labelThe category of the timer.

Definition at line 162 of file Recast.h.

void rcContext::enableLog ( bool  state) [inline]

Enables or disables logging.

Parameters:
[in]stateTRUE if logging should be enabled.

Definition at line 112 of file Recast.h.

void rcContext::enableTimer ( bool  state) [inline]

Enables or disables the performance timers.

Parameters:
[in]stateTRUE if timers should be enabled.

Definition at line 124 of file Recast.h.

int rcContext::getAccumulatedTime ( const rcTimerLabel  label) const [inline]

Returns the total accumulated time of the specified performance timer.

Parameters:
labelThe category of the timer.
Returns:
The accumulated time of the timer, or -1 if timers are disabled or the timer has never been started.

Definition at line 140 of file Recast.h.

void rcContext::log ( const rcLogCategory  category,
const char *  format,
  ... 
)

Logs a message.

Parameters:
[in]categoryThe category of the message.
[in]formatThe message.
void rcContext::resetLog ( ) [inline]

Clears all log entries.

Definition at line 115 of file Recast.h.

void rcContext::resetTimers ( ) [inline]

Clears all peformance timers. (Resets all to unused.)

Definition at line 127 of file Recast.h.

void rcContext::startTimer ( const rcTimerLabel  label) [inline]

Starts the specified performance timer.

Parameters:
labelThe category of timer.

Definition at line 131 of file Recast.h.

void rcContext::stopTimer ( const rcTimerLabel  label) [inline]

Stops the specified performance timer.

Parameters:
labelThe category of the timer.

Definition at line 135 of file Recast.h.


Member Data Documentation

bool rcContext::m_logEnabled [protected]

True if logging is enabled.

Definition at line 170 of file Recast.h.

bool rcContext::m_timerEnabled [protected]

True if the performance timers are enabled.

Definition at line 173 of file Recast.h.


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