Nebula
|
#include <debugcounter.h>
A debug counter for counting events.
Inherits Core::RefCounted.
Public Member Functions | |
DebugCounter () | |
constructor | |
virtual | ~DebugCounter () |
destructor | |
void | Setup (const Util::StringAtom &name, const Util::StringAtom &group=Util::StringAtom("Ungrouped")) |
setup the counter | |
void | Discard () |
discard the counter | |
bool | IsValid () const |
return true if object has been setup | |
void | Begin (bool reset=true) |
begin counting, optionally reset the counter | |
void | Reset () |
manually reset the counter to zero | |
void | Incr (int amount) |
increment the counter by a specific value | |
void | Decr (int amount) |
decrement the counter by a specific value | |
void | Set (int val) |
set the counter directly | |
void | End () |
end counting, write current value to history | |
const Util::StringAtom & | GetName () const |
get the counter's name | |
const Util::StringAtom & | GetGroup () const |
get the timer group | |
int | GetSample () const |
get the most recent sample | |
Util::Array< int > | GetHistory () const |
get the counter's history | |
Public Member Functions inherited from Core::RefCounted | |
RefCounted () | |
constructor | |
int | GetRefCount () const |
get the current refcount | |
void | AddRef () |
increment refcount by one | |
void | Release () |
decrement refcount and destroy object if refcount is zero | |
bool | IsInstanceOf (const Rtti &rtti) const |
return true if this object is instance of given class | |
bool | IsInstanceOf (const Util::String &className) const |
return true if this object is instance of given class by string | |
bool | IsInstanceOf (const Util::FourCC &classFourCC) const |
return true if this object is instance of given class by fourcc | |
bool | IsA (const Rtti &rtti) const |
return true if this object is instance of given class, or a derived class | |
bool | IsA (const Util::String &rttiName) const |
return true if this object is instance of given class, or a derived class, by string | |
bool | IsA (const Util::FourCC &rttiFourCC) const |
return true if this object is instance of given class, or a derived class, by fourcc | |
const Util::String & | GetClassName () const |
get the class name | |
Util::FourCC | GetClassFourCC () const |
get the class FourCC code | |
Private Member Functions | |
__DeclareClass (DebugCounter) | |
Private Attributes | |
Threading::CriticalSection | critSect |
Util::StringAtom | name |
Util::StringAtom | group |
int | value |
Util::RingBuffer< int > | history |
Additional Inherited Members | |
Static Public Member Functions inherited from Core::RefCounted | |
static void | DumpRefCountingLeaks () |
dump refcounting leaks, call at end of application (NEBULA_DEBUG builds only!) | |
Protected Member Functions inherited from Core::RefCounted | |
virtual | ~RefCounted () |
destructor (called when refcount reaches zero) | |
Debug::DebugCounter::DebugCounter | ( | ) |
constructor
|
virtual |
destructor
|
private |
|
inline |
begin counting, optionally reset the counter
|
inline |
decrement the counter by a specific value
void Debug::DebugCounter::Discard | ( | ) |
discard the counter
|
inline |
end counting, write current value to history
|
inline |
get the timer group
Array< int > Debug::DebugCounter::GetHistory | ( | ) | const |
get the counter's history
|
inline |
get the counter's name
int Debug::DebugCounter::GetSample | ( | ) | const |
get the most recent sample
|
inline |
increment the counter by a specific value
|
inline |
return true if object has been setup
|
inline |
manually reset the counter to zero
|
inline |
set the counter directly
void Debug::DebugCounter::Setup | ( | const Util::StringAtom & | name, |
const Util::StringAtom & | group = Util::StringAtom("Ungrouped") ) |
setup the counter
|
private |
|
private |
|
private |
|
private |
|
private |