GG
|
A mapping between the values of an enum and the string representations of the enum's values. More...
#include <Enum.h>
Public Member Functions | |
virtual | ~EnumMap () |
virtual const std::string & | FromEnum (long int) const |
virtual long int | FromString (const std::string &) const |
A mapping between the values of an enum and the string representations of the enum's values.
A specialization should be declared for each enumerated type for which an EnumMap is desired.
virtual const std::string& GG::EnumMap< E >::FromEnum | ( | long | i | ) | const [inline, virtual] |
Returns the string associated with the enumeration value i, or the empty string if i is unknown.
Implements GG::EnumMapBase.
virtual long int GG::EnumMap< E >::FromString | ( | const std::string & | str | ) | const [inline, virtual] |
Returns the enumeration value associated with the string str, or BAD_VALUE if str is unknown.
Implements GG::EnumMapBase.