OpenFOAM logo
Open Source CFD Toolkit

NamedEnum Class Template Reference

Inheritance diagram for NamedEnum:

Inheritance graph
[legend]
Collaboration diagram for NamedEnum:

Collaboration graph
[legend]
List of all members.

template<class Enum, int nEnum>
class Foam::NamedEnum< Enum, nEnum >


Public Member Functions

 NamedEnum ()
 Construct from names.
const Enum read (Istream &is) const
 Read a word from Istream and return the corresponding.
const Enum operator[] (const char *name) const
 Return the enumeration element corresponding to the given name.
const Enum operator[] (const word &name) const
 Return the enumeration element corresponding to the given name.
const char * operator[] (const Enum e) const
 Return the name or the given enumeration element.

Static Public Attributes

const char * names [nEnum]
 The set of names corresponding to the enumeration Enum.

Constructor & Destructor Documentation

NamedEnum  ) 
 

Construct from names.


Member Function Documentation

const char* operator[] const Enum  e  )  const [inline]
 

Return the name or the given enumeration element.

Definition at line 125 of file NamedEnum.H.

const Enum operator[] const word name  )  const [inline]
 

Return the enumeration element corresponding to the given name.

Reimplemented from HashTable< int >.

Definition at line 119 of file NamedEnum.H.

const Enum operator[] const char *  name  )  const [inline]
 

Return the enumeration element corresponding to the given name.

Definition at line 113 of file NamedEnum.H.

const Enum read Istream is  )  const [inline]
 

Read a word from Istream and return the corresponding.

enumeration element

Definition at line 90 of file NamedEnum.H.


Member Data Documentation

const char* names[nEnum] [static]
 

The set of names corresponding to the enumeration Enum.

Definition at line 75 of file NamedEnum.H.


The documentation for this class was generated from the following file:
For further information go to www.openfoam.org