GG::EnumMap< E > Struct Template Reference

A mapping between the values of an enum and the string representations of the enum's values. More...

#include <Enum.h>

Inheritance diagram for GG::EnumMap< E >:

GG::EnumMapBase List of all members.

Public Member Functions

virtual ~EnumMap ()
virtual const std::string & FromEnum (int) const
virtual int FromString (const std::string &) const

Detailed Description

template<class E>
struct GG::EnumMap< E >

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.

Definition at line 57 of file Enum.h.


Constructor & Destructor Documentation

template<class E>
virtual GG::EnumMap< E >::~EnumMap (  )  [inline, virtual]

Virtual dtor.

Definition at line 59 of file Enum.h.


Member Function Documentation

template<class E>
virtual const std::string& GG::EnumMap< E >::FromEnum ( int  i  )  const [inline, virtual]

Returns the string associated with the enumeration value i, or the empty string if i is unknown.

Implements GG::EnumMapBase.

Definition at line 60 of file Enum.h.

template<class E>
virtual 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.

Definition at line 62 of file Enum.h.


The documentation for this struct was generated from the following file:
Generated on Wed Mar 26 14:35:42 2008 for GG by  doxygen 1.5.2