Go to the documentation of this file.
30 template<
class EnumType>
37 template<
class EnumType>
44 template<
class EnumType>
52 template<
class EnumType>
60 template<
class EnumType>
68 template<
class EnumType>
80 template<
class EnumType>
88 template<
class EnumType>
91 return keys_.find(enumName);
95 template<
class EnumType>
98 return vals_.find(
int(
e));
102 template<
class EnumType>
105 return keys_.found(enumName);
109 template<
class EnumType>
112 return vals_.found(
int(
e));
116 template<
class EnumType>
119 const label idx =
find(
e);
130 template<
class EnumType>
139 return readEntry(
key,
dict, val,
false);
143 template<
class EnumType>
146 const label idx =
find(
e);
155 template<
class EnumType>
162 for (
const word&
k : keys_)
175 template<
class EnumType>
187 template<
class EnumType>
191 return ptr_->
names()[idx_];
195 template<
class EnumType>
198 return EnumType(ptr_->values()[idx_]);
202 template<
class EnumType>
211 template<
class EnumType>
217 return idx_ == iter.idx_;
221 template<
class EnumType>
227 return idx_ != iter.idx_;
231 template<
class EnumType>
239 template<
class EnumType>
249 template<
class EnumType>
255 return get(enumName);
259 template<
class EnumType>
271 template<
class EnumType>
275 const Enum<EnumType>& list
278 return list.writeList(
os);
282 template<
class EnumType>
283 inline std::ostream& Foam::operator<<
286 const Enum<EnumType>& list
289 return list.writeList(
os);
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.
bool found(const word &enumName) const
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
bool empty() const noexcept
const List< word > & toc() const noexcept
EnumType get(const word &enumName) const
void write(const EnumType e, Ostream &os) const
const_iterator & operator++() noexcept
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
label find(const ListType &input, const UnaryPredicate &pred, const label start=0)
const_iterator(const Enum *eptr=nullptr, const label idx=0) noexcept
label size() const noexcept
OS & writeList(OS &os, const label ununsed=0) const
const dimensionedScalar e
bool readIfPresent(const word &key, const dictionary &dict, EnumType &val) const
const_iterator cbegin() const noexcept
List< word > sortedToc() const
label find(const word &enumName) const
const_iterator cend() const noexcept
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const List< int > & values() const noexcept
const List< word > & names() const noexcept