Public Types | |
|
typedef std::pair< int, std::string > | typePair |
|
typedef std::map< int, std::string > | typeEnum |
| typedef typeEnum::iterator | iterator |
| typedef typeEnum::const_iterator | const_iterator |
Public Member Functions | |
| void | insert (const typePair &value) |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
Check for existence | |
| bool | exists (int value) const |
| bool | exists (const std::string &value) const |
Accessing values (which must exist) | |
| std::string | operator[] (int value) const throw (std::out_of_range) |
| int | operator[] (const std::string &value) const throw (std::out_of_range) |
Protected Member Functions | |
| virtual | ~MetaEnum () |
| YGP::MetaEnum::~MetaEnum | ( | ) | [protected, virtual] |
Destructor.
| const_iterator YGP::MetaEnum::begin | ( | ) | const [inline] |
Returns an iterator to the first element of the enumeration.
| iterator YGP::MetaEnum::begin | ( | ) | [inline] |
Returns an iterator to the first element of the enumeration.
| const_iterator YGP::MetaEnum::end | ( | ) | const [inline] |
Returns an iterator after the last element of the enumeration.
| iterator YGP::MetaEnum::end | ( | ) | [inline] |
Returns an iterator after the last element of the enumeration.
| bool YGP::MetaEnum::exists | ( | const std::string & | value | ) | const |
Checks if the passed string-value exists within the enum.
| value | Value to check for |
| bool YGP::MetaEnum::exists | ( | int | value | ) | const [inline] |
Checks if the integer value exists.
| value | Value to check for |
| void YGP::MetaEnum::insert | ( | const typePair & | value | ) | [inline] |
Inserts a new item into the object.
| value | Value to insert; create with std::make_pair |
| int YGP::MetaEnum::operator[] | ( | const std::string & | value | ) | const throw (std::out_of_range) |
Returns the numeric value of the passed string.
| value | String Value to return numeric |
| std::string YGP::MetaEnum::operator[] | ( | int | value | ) | const throw (std::out_of_range) |
Returns the string-value of the passed value.
| value | Value to return as string |
| std::out_of_range |