#include <MetaEnum.h>
Public Member Functions | |
const karto::String & | GetName () const |
const karto::String & | GetName (kt_int64s value) const |
const EnumPair & | GetPair (kt_size_t index) const |
kt_size_t | GetSize () const |
kt_int64s | GetValue (const karto::String &rName) const |
kt_bool | HasName (const karto::String &rName) const |
kt_bool | HasValue (kt_int64s value) const |
kt_bool | operator!= (const MetaEnum &rOther) const |
kt_bool | operator== (const MetaEnum &rOther) const |
Public Member Functions inherited from karto::Referenced | |
Referenced () | |
Static Public Member Functions | |
template<typename T > | |
static MetaEnumHelper | Register (const karto::String &rName) |
Protected Member Functions | |
void | AddEnumPair (const EnumPair &rPair) |
Protected Member Functions inherited from karto::Referenced | |
kt_int32s | GetReferenceCount () |
kt_int32s | Reference () const |
kt_int32s | Unreference () const |
kt_int32s | UnreferenceNoDelete () const |
Private Member Functions | |
MetaEnum (const karto::String &rName) | |
~MetaEnum () | |
Private Attributes | |
MetaEnumPrivate * | m_pPrivate |
Friends | |
class | MetaEnumHelper |
class | MetaEnumManager |
A MetaEnum stores information about an enum like enum name and enum values see EnumPair.
Definition at line 121 of file MetaEnum.h.
|
private |
Definition at line 42 of file MetaEnum.cpp.
|
private |
Definition at line 48 of file MetaEnum.cpp.
|
protected |
const karto::String & karto::MetaEnum::GetName | ( | ) | const |
const karto::String & karto::MetaEnum::GetName | ( | kt_int64s | value | ) | const |
Gets the associated EnumPair name with the specified value.
value |
Definition at line 80 of file MetaEnum.cpp.
Gets a reference to the EnumPair at index.
index |
Exception | if index out of range |
Definition at line 107 of file MetaEnum.cpp.
kt_size_t karto::MetaEnum::GetSize | ( | ) | const |
Gets the number of EnumPair's registered with this MetaEnum.
Definition at line 92 of file MetaEnum.cpp.
kt_int64s karto::MetaEnum::GetValue | ( | const karto::String & | rName | ) | const |
Gets the associated EnumPair value with the specified name.
rName |
Definition at line 63 of file MetaEnum.cpp.
kt_bool karto::MetaEnum::HasName | ( | const karto::String & | rName | ) | const |
Checks if enum have a defined EnumPair by specified name.
rName |
Definition at line 53 of file MetaEnum.cpp.
Checks if enum have a defined EnumPair by specified value.
value |
Definition at line 58 of file MetaEnum.cpp.
Inequality operator checks inequality between two MetaEnum's.
rOther |
Definition at line 102 of file MetaEnum.cpp.
Equality operator checks equality between two MetaEnum's.
rOther |
Definition at line 97 of file MetaEnum.cpp.
|
inlinestatic |
Registers a new MetaEnum by name.
rName | Name of new MetaEnum |
Definition at line 130 of file MetaEnum.h.
|
friend |
Definition at line 210 of file MetaEnum.h.
|
friend |
Definition at line 211 of file MetaEnum.h.
|
private |
Definition at line 218 of file MetaEnum.h.