Recast Navigation
1.0.35
|
Provides an interface for optional logging and performance tracking of the Recast build process. More...
#include <Recast.h>
Public Member Functions | |
rcContext (bool logAndProfile=true) | |
Contructor. More... | |
virtual | ~rcContext () |
void | enableLog (bool state) |
Enables or disables logging. More... | |
void | resetLog () |
Clears all log entries. More... | |
void | log (const rcLogCategory category, const char *format,...) |
Logs a message. More... | |
void | enableTimer (bool state) |
Enables or disables the performance timers. More... | |
void | resetTimers () |
Clears all peformance timers. (Resets all to unused.) More... | |
void | startTimer (const rcTimerLabel label) |
Starts the specified performance timer. More... | |
void | stopTimer (const rcTimerLabel label) |
Stops the specified performance timer. More... | |
int | getAccumulatedTime (const rcTimerLabel label) const |
Returns the total accumulated time of the specified performance timer. More... | |
Protected Member Functions | |
virtual void | doResetLog () |
Clears all log entries. More... | |
virtual void | doLog (const rcLogCategory category, const char *msg, const int len) |
Logs a message. More... | |
virtual void | doResetTimers () |
Clears all timers. (Resets all to unused.) More... | |
virtual void | doStartTimer (const rcTimerLabel label) |
Starts the specified performance timer. More... | |
virtual void | doStopTimer (const rcTimerLabel label) |
Stops the specified performance timer. More... | |
virtual int | doGetAccumulatedTime (const rcTimerLabel label) const |
Returns the total accumulated time of the specified performance timer. More... | |
Protected Attributes | |
bool | m_logEnabled |
True if logging is enabled. More... | |
bool | m_timerEnabled |
True if the performance timers are enabled. More... | |
Provides an interface for optional logging and performance tracking of the Recast build process.
This class does not provide logging or timer functionality on its own. Both must be provided by a concrete implementation by overriding the protected member functions. Also, this class does not provide an interface for extracting log messages. (Only adding them.) So concrete implementations must provide one.
If no logging or timers are required, just pass an instance of this class through the Recast build process.
|
inline |
Contructor.
[in] | logAndProfile | TRUE if the logging and performance timers should be enabled. [Default: true] |
|
inlinevirtual |
|
inlineprotectedvirtual |
Returns the total accumulated time of the specified performance timer.
[in] | label | The category of the timer. |
|
inlineprotectedvirtual |
Logs a message.
[in] | category | The category of the message. |
[in] | msg | The formatted message. |
[in] | len | The length of the formatted message. |
|
inlineprotectedvirtual |
Clears all log entries.
|
inlineprotectedvirtual |
Clears all timers. (Resets all to unused.)
|
inlineprotectedvirtual |
Starts the specified performance timer.
[in] | label | The category of timer. |
|
inlineprotectedvirtual |
Stops the specified performance timer.
[in] | label | The category of the timer. |
|
inline |
Enables or disables logging.
[in] | state | TRUE if logging should be enabled. |
|
inline |
Enables or disables the performance timers.
[in] | state | TRUE if timers should be enabled. |
|
inline |
Returns the total accumulated time of the specified performance timer.
label | The category of the timer. |
void rcContext::log | ( | const rcLogCategory | category, |
const char * | format, | ||
... | |||
) |
Logs a message.
[in] | category | The category of the message. |
[in] | format | The message. |
Example:
|
inline |
Clears all log entries.
|
inline |
Clears all peformance timers. (Resets all to unused.)
|
inline |
Starts the specified performance timer.
label | The category of timer. |
|
inline |
Stops the specified performance timer.
label | The category of the timer. |
|
protected |
True if logging is enabled.
|
protected |
True if the performance timers are enabled.