30template<
class EnumType>
37template<
class EnumType>
44template<
class EnumType>
52template<
class EnumType>
60template<
class EnumType>
68template<
class EnumType>
80template<
class EnumType>
88template<
class EnumType>
91 return keys_.find(enumName);
95template<
class EnumType>
98 return vals_.find(
int(
e));
102template<
class EnumType>
105 return keys_.found(enumName);
109template<
class EnumType>
112 return vals_.found(
int(
e));
116template<
class EnumType>
119 const label idx = find(
e);
130template<
class EnumType>
139 return readEntry(key,
dict, val,
false);
143template<
class EnumType>
146 const label idx = find(
e);
155template<
class EnumType>
162 for (
const word&
k : keys_)
175template<
class EnumType>
187template<
class EnumType>
191 return ptr_->
names()[idx_];
195template<
class EnumType>
198 return EnumType(ptr_->values()[idx_]);
202template<
class EnumType>
211template<
class EnumType>
217 return idx_ == iter.idx_;
221template<
class EnumType>
227 return idx_ != iter.idx_;
231template<
class EnumType>
239template<
class EnumType>
249template<
class EnumType>
255 return get(enumName);
259template<
class EnumType>
271template<
class EnumType>
278 return list.writeList(
os);
282template<
class EnumType>
283inline std::ostream& Foam::operator<<
289 return list.writeList(
os);
A const_iterator for iterating an Enum list.
const_iterator & operator++() noexcept
Move to the next index.
EnumType val() const
Enumeration value at the current index.
const word & key() const
The name at the current index.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
const_iterator cbegin() const noexcept
const List< int > & values() const noexcept
The list of enum values, in construction order.
label find(const word &enumName) const
Find the index of the given name.
bool empty() const noexcept
True if the enumeration list is empty.
OS & writeList(OS &os, const label ununsed=0) const
const_iterator cend() const noexcept
const List< word > & names() const noexcept
The list of enum names, in construction order. Same as toc()
label size() const noexcept
The number of name/value pairs for the enumeration.
const List< word > & toc() const noexcept
The list of enum names, in construction order. Same as names()
List< word > sortedToc() const
The sorted list of enum names.
void clear()
Clear all entries.
EnumType get(const word &enumName) const
The enumeration corresponding to the given name.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
unsigned int get() const
Get value as unsigned, no range-checking.
A const_iterator for iterating across on values.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool write()
Write the output fields.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
void sort(UList< T > &list)
Sort the list.