Atoms Crowd  4.1.0
AtomsUtils::rcContext Class Reference

#include <Recast.h>

Inheritance diagram for AtomsUtils::rcContext:
AtomsUtils::RecastContext

Public Member Functions

 rcContext (bool state=true)
 
void enableLog (bool state)
 
void resetLog ()
 Clears all log entries.
 
void log (const rcLogCategory category, const char *format,...)
 
void enableTimer (bool state)
 
void resetTimers ()
 Clears all peformance timers. (Resets all to unused.)
 
void startTimer (const rcTimerLabel label)
 
void stopTimer (const rcTimerLabel label)
 
int getAccumulatedTime (const rcTimerLabel label) const
 

Protected Member Functions

virtual void doResetLog ()
 Clears all log entries.
 
virtual void doLog (const rcLogCategory, const char *, const int)
 
virtual void doResetTimers ()
 Clears all timers. (Resets all to unused.)
 
virtual void doStartTimer (const rcTimerLabel)
 
virtual void doStopTimer (const rcTimerLabel)
 
virtual int doGetAccumulatedTime (const rcTimerLabel) const
 

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.

Constructor & Destructor Documentation

◆ rcContext()

AtomsUtils::rcContext::rcContext ( bool  state = true)
inline

Contructor.

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

Member Function Documentation

◆ doGetAccumulatedTime()

virtual int AtomsUtils::rcContext::doGetAccumulatedTime ( const  rcTimerLabel) const
inlineprotectedvirtual

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.

◆ doLog()

virtual void AtomsUtils::rcContext::doLog ( const  rcLogCategory,
const char *  ,
const int   
)
inlineprotectedvirtual

Logs a message.

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

◆ doStartTimer()

virtual void AtomsUtils::rcContext::doStartTimer ( const  rcTimerLabel)
inlineprotectedvirtual

Starts the specified performance timer.

Parameters
[in]labelThe category of timer.

◆ doStopTimer()

virtual void AtomsUtils::rcContext::doStopTimer ( const  rcTimerLabel)
inlineprotectedvirtual

Stops the specified performance timer.

Parameters
[in]labelThe category of the timer.

◆ enableLog()

void AtomsUtils::rcContext::enableLog ( bool  state)
inline

Enables or disables logging.

Parameters
[in]stateTRUE if logging should be enabled.

◆ enableTimer()

void AtomsUtils::rcContext::enableTimer ( bool  state)
inline

Enables or disables the performance timers.

Parameters
[in]stateTRUE if timers should be enabled.

◆ getAccumulatedTime()

int AtomsUtils::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.

◆ log()

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

Logs a message.

Parameters
[in]categoryThe category of the message.
[in]formatThe message.

◆ startTimer()

void AtomsUtils::rcContext::startTimer ( const rcTimerLabel  label)
inline

Starts the specified performance timer.

Parameters
labelThe category of timer.

◆ stopTimer()

void AtomsUtils::rcContext::stopTimer ( const rcTimerLabel  label)
inline

Stops the specified performance timer.

Parameters
labelThe category of the timer.

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