Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends
karto::MetaEnum Class Reference

#include <MetaEnum.h>

Inheritance diagram for karto::MetaEnum:
Inheritance graph
[legend]

List of all members.

Public Member Functions

const karto::StringGetName () const
const karto::StringGetName (kt_int64s value) const
const EnumPairGetPair (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

Static Public Member Functions

template<typename T >
static MetaEnumHelper Register (const karto::String &rName)

Protected Member Functions

void AddEnumPair (const EnumPair &rPair)

Private Member Functions

 MetaEnum (const karto::String &rName)
 ~MetaEnum ()

Private Attributes

MetaEnumPrivatem_pPrivate

Friends

class MetaEnumHelper
class MetaEnumManager

Detailed Description

A MetaEnum stores information about an enum like enum name and enum values see EnumPair.

Definition at line 121 of file MetaEnum.h.


Constructor & Destructor Documentation

karto::MetaEnum::MetaEnum ( const karto::String rName) [private]

Definition at line 42 of file MetaEnum.cpp.

Definition at line 48 of file MetaEnum.cpp.


Member Function Documentation

void karto::MetaEnum::AddEnumPair ( const EnumPair rPair) [protected]

Adds EnumPair.

Parameters:
rPairEnumPair to add

Definition at line 118 of file MetaEnum.cpp.

Gets the name of the MetaEnum.

Returns:
name of MetaEnum

Definition at line 75 of file MetaEnum.cpp.

Gets the associated EnumPair name with the specified value.

Parameters:
value
Returns:
enum name
Exceptions:
Exceptionif no EnumPair is defined for value

Definition at line 80 of file MetaEnum.cpp.

const EnumPair & karto::MetaEnum::GetPair ( kt_size_t  index) const

Gets a reference to the EnumPair at index.

Parameters:
index
Returns:
EnumPair at index
Exceptions:
Exceptionif index out of range

Definition at line 107 of file MetaEnum.cpp.

Gets the number of EnumPair's registered with this MetaEnum.

Returns:
number of EnumPair's

Definition at line 92 of file MetaEnum.cpp.

Gets the associated EnumPair value with the specified name.

Parameters:
rName
Returns:
enum value
Exceptions:
Exceptionif no EnumPair is defined for name

Definition at line 63 of file MetaEnum.cpp.

Checks if enum have a defined EnumPair by specified name.

Parameters:
rName
Returns:
true of EnumPair exists, false otherwise

Definition at line 53 of file MetaEnum.cpp.

Checks if enum have a defined EnumPair by specified value.

Parameters:
value
Returns:
true of EnumPair exists, false otherwise

Definition at line 58 of file MetaEnum.cpp.

kt_bool karto::MetaEnum::operator!= ( const MetaEnum rOther) const

Inequality operator checks inequality between two MetaEnum's.

Parameters:
rOther
Returns:
true if unequal, false otherwise

Definition at line 102 of file MetaEnum.cpp.

kt_bool karto::MetaEnum::operator== ( const MetaEnum rOther) const

Equality operator checks equality between two MetaEnum's.

Parameters:
rOther
Returns:
true if equal, false otherwise

Definition at line 97 of file MetaEnum.cpp.

template<typename T >
static MetaEnumHelper karto::MetaEnum::Register ( const karto::String rName) [inline, static]

Registers a new MetaEnum by name.

Parameters:
rNameName of new MetaEnum
Returns:
helper class for creating MetaEnum

Definition at line 130 of file MetaEnum.h.


Friends And Related Function Documentation

friend class MetaEnumHelper [friend]

Definition at line 210 of file MetaEnum.h.

friend class MetaEnumManager [friend]

Definition at line 211 of file MetaEnum.h.


Member Data Documentation

Definition at line 218 of file MetaEnum.h.


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


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Mon Oct 6 2014 02:44:18