TrinityCore
|
#include <Recast.h>
Public Member Functions | |
rcContext (bool state=true) | |
virtual | ~rcContext () |
void | enableLog (bool state) |
void | resetLog () |
Clears all log entries. More... | |
void | log (const rcLogCategory category, const char *format,...) |
void | enableTimer (bool state) |
void | resetTimers () |
Clears all peformance timers. (Resets all to unused.) More... | |
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. More... | |
virtual void | doLog (const rcLogCategory, const char *, const int) |
virtual void | doResetTimers () |
Clears all timers. (Resets all to unused.) More... | |
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. 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.
Contructor.
[in] | state | TRUE if the logging and performance timers should be enabled. [Default: true] |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
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.