Go to the documentation of this file.
52 template<
class Enum,
int nEnum>
74 static const char*
names[nEnum];
void write(const Enum e, Ostream &) const
Write the name representation of the enumeration to an Ostream.
StaticAssert(nEnum > 0)
nEnum must be positive (non-zero)
void operator=(const NamedEnum &)
Disallow default bitwise assignment.
A class for handling words, derived from string.
static wordList words()
The set of names as a list of words.
const char * operator[](const Enum e) const
Return the name of the given enumeration element.
const Enum operator[](const char *name) const
Return the enumeration element corresponding to the given name.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
static stringList strings()
The set of names as a list of strings.
const double e
Elementary charge.
An STL-conforming hash table.
Enum read(Istream &) const
Read a word from Istream and return the corresponding.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
NamedEnum()
Construct from names.
const Enum operator[](const word &name) const
Return the enumeration element corresponding to the given name.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static const char * names[nEnum]
The set of names corresponding to the enumeration Enum.
word name(const complex &)
Return a string representation of a complex.
Initialise the NamedEnum HashTable from the static list of names.