GG
Public Member Functions
GG::EnumMap< E > Struct Template Reference

#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
- Public Member Functions inherited from GG::EnumMapBase
virtual ~EnumMapBase ()

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.


Member Function Documentation

template<class E>
virtual const std::string& GG::EnumMap< E >::FromEnum ( long  i) const
inlinevirtual

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
inlinevirtual

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: