FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

NamedEnum< Enum, nEnum > Class Template Reference

Initialise the NamedEnum HashTable from the static list of names. More...

#include <OpenFOAM/NamedEnum.H>


Detailed Description

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

Initialise the NamedEnum HashTable from the static list of names.

Source files

Definition at line 51 of file NamedEnum.H.

Inheritance diagram for NamedEnum< Enum, nEnum >:
Collaboration diagram for NamedEnum< Enum, nEnum >:

List of all members.

Public Member Functions

 NamedEnum ()
 Construct from names.
Enum  read (Istream &) const
 Read a word from Istream and return the corresponding.
void  write (const Enum e, Ostream &) const
 Write the name representation of the enumeration to an Ostream.
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 of the given enumeration element.
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []
template<>
const char *  names []

Static Public Attributes

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

Constructor & Destructor Documentation


Member Function Documentation

Enum read ( Istream &   is  ) const

Read a word from Istream and return the corresponding.

enumeration element

Definition at line 62 of file NamedEnum.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorIn, and Foam::name().

Referenced by Time::readDict().

void write ( const Enum   e,
Ostream &   os  
) const

Write the name representation of the enumeration to an Ostream.

Definition at line 82 of file NamedEnum.C.

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

Return the enumeration element corresponding to the given name.

Definition at line 94 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 100 of file NamedEnum.H.

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

Return the name of the given enumeration element.

Definition at line 106 of file NamedEnum.H.

const char * names (  )
const char * names (  )

Definition at line 40 of file directions.C.

const char * names (  )

Definition at line 52 of file slidingInterface.C.

const char * names (  )

Definition at line 44 of file surfaceDisplacementPointPatchVectorField.C.

const char * names (  )
const char * names (  )

Definition at line 31 of file phaseProperties.C.

const char * names (  )

Definition at line 44 of file directMappedPatchBase.C.

const char * names (  )

Definition at line 56 of file distributedTriSurfaceMesh.C.

const char * names (  )

Definition at line 55 of file faceToCell.C.

const char * names (  )

Definition at line 55 of file faceZoneToCell.C.

const char * names (  )

Definition at line 54 of file pointToCell.C.

const char * names (  )

Definition at line 56 of file cellToFace.C.

const char * names (  )

Definition at line 56 of file pointToFace.C.

const char * names (  )

Definition at line 54 of file cellToPoint.C.

const char * names (  )

Definition at line 54 of file faceToPoint.C.

const char * names (  )

Definition at line 103 of file topoSetSource.C.

const char * names (  )

Definition at line 35 of file outputFilterOutputControl.C.

const char * names (  )

Definition at line 35 of file Pstream.C.

const char * names (  )

Definition at line 36 of file Time.C.

const char * names (  )

Definition at line 48 of file Time.C.

const char * names (  )

Definition at line 36 of file coupledPolyPatch.C.

const char * names (  )

Definition at line 35 of file intersection.C.

const char * names (  )

Definition at line 45 of file intersection.C.

const char * names (  )

Definition at line 31 of file fieldAverageItem.C.

const char * names (  )

Definition at line 41 of file fieldMinMax.C.

const char * names (  )

Definition at line 43 of file alphaContactAngleFvPatchScalarField.C.


Member Data Documentation

const char* names[nEnum] [static]

The set of names corresponding to the enumeration Enum.

Definition at line 72 of file NamedEnum.H.


The documentation for this class was generated from the following files: