Go to the documentation of this file.
51 #include <type_traits>
59 template<
class EnumType,
int nEnum>
class NamedEnum;
61 template<
class EnumType,
int nEnum>
69 template<
class EnumType,
int nEnum>
73 static_assert(nEnum > 0,
"nEnum must be positive (non-zero)");
88 void operator=(
const NamedEnum&) =
delete;
94 typedef EnumType value_type;
100 static const char*
names[nEnum];
114 inline label size()
const;
132 inline bool found(
const word& enumName)
const;
135 inline bool hasEnum(
const word& enumName)
const;
138 bool hasName(
const EnumType
e)
const;
156 EnumType lookupOrDefault
177 inline const EnumType operator[](
const word&
name)
const;
180 inline const char* operator[](
const EnumType
e)
const;
186 friend Ostream& operator<< <EnumType, nEnum>
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
A class for handling words, derived from Foam::string.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
bool read(const char *buf, int32_t &val)
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
Ostream & operator<<(Ostream &, const boundaryPatch &p)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Lookup type of boundary radiation properties.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const dimensionedScalar e
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
void write(vtk::formatter &fmt, const Type &val, const label n=1)
word name(const expressions::valueTypeCode typeCode)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
A NamedEnum is a wrapper around a list of names that represent particular enumeration values.