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 (long int) const
virtual long 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 62 of file Enum.h.


Constructor & Destructor Documentation

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

Virtual dtor.

Definition at line 64 of file Enum.h.


Member Function Documentation

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

Definition at line 65 of file Enum.h.

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

Definition at line 67 of file Enum.h.


The documentation for this struct was generated from the following file:

Generated on Sat Mar 26 07:08:38 2011 for GG by  doxygen 1.5.9