Go to the documentation of this file.
51 #ifndef DictionaryBase_H
52 #define DictionaryBase_H
64 template<
class IDLListType,
class T>
67 template<
class IDLListType,
class T>
75 template<
class IDLListType,
class T>
138 template<
class Compare>
182 friend Ostream& operator<< <IDLListType, T>
197 return this->
cfind(keyword);
206 return this->
find(keyword);
void operator=(const DictionaryBase &)
Copy assignment.
A class for handling words, derived from Foam::string.
wordList toc() const
Return the table of contents (as a sorted list)
const T * operator[](const word &key) const
Find and return entry.
void transfer(DictionaryBase< IDLListType, T > &dict)
Transfer the contents of the argument into this DictionaryBase.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
wordList sortedToc() const
Return the table of contents as a sorted list.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
A helper class when constructing from an Istream or dictionary.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
DictionaryBase(const label size=128)
Construct with given or default (128) table capacity.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
T * remove(const word &keyword)
Remove and return entry specified by keyword.
bool found(const word &keyword) const
Search for given keyword.
const T * lookupPtr(const word &keyword) const
Deprecated(2020-03) use cfind()
void append(const word &keyword, T *)
Add at tail of dictionary.
const T * lookup(const word &keyword) const
Find and return entry, FatalError on failure.
T * find(const word &keyword)
Find and return an entry, nullptr on failure.
void insert(const word &keyword, T *)
Add at head of dictionary.
HashTable< T * > hashedTs_
HashTable of the entries held on the IDLListType for quick lookup.
void clear()
Clear the dictionary.
T * operator[](const word &key)
Find and return entry.
Base dictionary class templated on both the form of doubly-linked list it uses as well as the type it...
const T * cfind(const word &keyword) const
Find and return an entry, nullptr on failure.
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
An Ostream is an abstract base class for all output systems (streams, files, token lists,...