40 #ifndef Foam_hashedWordList_H 41 #define Foam_hashedWordList_H 92 template<
class AnyType,
class AnyHash>
129 inline void rehash(
bool unique);
143 inline label
find(
const word& val)
const;
173 inline void operator=(std::initializer_list<word> list);
void rehash() const
Rebuild the lookup hash indices.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
void append(const word &val)
Same as push_uniq()
bool contains(const word &val) const
Is the value contained in the list (searches the hash).
label appendUniq(const word &val)
Same as push_uniq()
const word & operator[](const label index) const
Return name corresponding to specified index.
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
void push_back(const word &val)
Same as push_uniq()
void sort()
Inplace sort list and rehash the indices.
hashedWordList()=default
Default construct an empty list.
A class for handling words, derived from Foam::string.
Istream & operator>>(Istream &, directionInfo &)
label push_uniq(const word &val)
Append an element if not already in the list.
bool operator()(const word &val) const
Check hashed values for the specified name - same as contains().
#define FOAM_DEPRECATED_STRICT(since, replacement)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void operator=(const hashedWordList &list)
Copy assignment. Rehashes the indices.
void clear()
Clear the list, i.e. set size to zero.
const HashTable< label > & lookup() const
Return the hash of words/indices for inspection.
bool found(const word &val) const
Same as contains(), searches the hash.
A wordList with hashed named lookup, which can be faster in some situations than using the normal lis...
void transfer(hashedWordList &list)
Transfer contents of the argument into this list and annul the argument list, optionally eliminating ...
void swap(hashedWordList &list)
Swap contents.
label find(const word &val) const
Find index of the value (searches the hash).
void uniq()
Adjust the list (if needed) to eliminate duplicate entries, and rehash the indices.