41 #ifndef Foam_PtrListDictionary_H 42 #define Foam_PtrListDictionary_H 106 <<
"Cannot insert '" <<
key <<
"' into hash-table" 113 autoPtr<T>
set(
const label i,
const word&
key, autoPtr<T>& ptr)
115 return this->
set(i,
key, ptr.release());
119 autoPtr<T>
set(
const label i,
const word&
key, tmp<T>& ptr)
121 return this->
set(i,
key, ptr.ptr());
Base dictionary class templated on both the form of doubly-linked list it uses as well as the type it...
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
PtrListDictionary()=default
Default construct: empty without allocation (capacity=0).
Template dictionary class which manages the storage associated with it.
A class for handling words, derived from Foam::string.
const T & operator[](const word &key) const
Find and return entry.
auto key(const Type &t) -> std::enable_if_t< std::is_enum_v< Type >, std::underlying_type_t< Type > >
errorManip< error > abort(error &err)
DictionaryBase< PtrList< T >, T > dict_type
The template instance used for the dictionary content.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void resize(const label newLen)
Adjust size of PtrList.
const T * lookup(const word &keyword) const
Find and return entry, FatalError on failure.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
A helper class when constructing from an Istream or dictionary.
bool addHashEntry(const word &key, T *ptr)
Add an entry to the HashTable.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...