Base dictionary class templated on both the form of doubly-linked list it uses as well as the type it holds. More...
#include <OpenFOAM/DictionaryBase.H>
Base dictionary class templated on both the form of doubly-linked list it uses as well as the type it holds.
The double templating allows for the instantiation of forms with or without storage management.
Definition at line 73 of file DictionaryBase.H.
Public Member Functions | |
DictionaryBase () | |
Null constructor.
| |
DictionaryBase (const DictionaryBase &) | |
Copy construct.
| |
template<class INew > | |
DictionaryBase (Istream &, const INew &) | |
Construct from Istream using given Istream constructor class.
| |
DictionaryBase (Istream &) | |
Construct from Istream using default Istream constructor class.
| |
bool | found (const word &) const |
Search DictionaryBase for given keyword.
| |
const T * | lookupPtr (const word &) const |
Find and return an entry if present, otherwise return NULL.
| |
T * | lookupPtr (const word &) |
Find and return an entry if present, otherwise return NULL.
| |
const T * | lookup (const word &) const |
Find and return entry.
| |
T * | lookup (const word &) |
Find and return entry.
| |
wordList | toc () const |
Return the table of contents.
| |
void | insert (const word &, T *) |
Add at head of dictionary.
| |
void | append (const word &, T *) |
Add at tail of dictionary.
| |
T * | remove (const word &) |
Remove and return entry specified by keyword.
| |
void | clear () |
Clear the dictionary.
| |
void | transfer (DictionaryBase< IDLListType, T > &) |
Transfer the contents of the argument into this DictionaryBase.
| |
void | operator= (const DictionaryBase &) |
const T * | operator[] (const word &key) const |
Find and return entry.
| |
T * | operator[] (const word &key) |
Find and return entry.
| |
Friends | |
Ostream & | operator (Ostream &, const DictionaryBase< IDLListType, T > &) |
DictionaryBase | ( | ) |
Null constructor.
Definition at line 48 of file DictionaryBase.C.
DictionaryBase | ( | const DictionaryBase< IDLListType, T > & | dict ) |
Copy construct.
Definition at line 54 of file DictionaryBase.C.
DictionaryBase | ( | Istream & | is, |
const INew & | iNew | ||
) |
Construct from Istream using given Istream constructor class.
Definition at line 67 of file DictionaryBase.C.
DictionaryBase | ( | Istream & | is ) |
Construct from Istream using default Istream constructor class.
Definition at line 79 of file DictionaryBase.C.
bool found | ( | const word & | keyword ) | const |
Search DictionaryBase for given keyword.
Definition at line 91 of file DictionaryBase.C.
References DictionaryBase< IDLListType, T >::found().
Referenced by DictionaryBase< IDLListType, T >::found().
const T * lookupPtr | ( | const word & | keyword ) | const |
Find and return an entry if present, otherwise return NULL.
Definition at line 100 of file DictionaryBase.C.
References HashTable< T, Key, Hash >::end(), and HashTable< T, Key, Hash >::find().
T * lookupPtr | ( | const word & | keyword ) |
Find and return an entry if present, otherwise return NULL.
Definition at line 119 of file DictionaryBase.C.
References HashTable< T, Key, Hash >::end(), and HashTable< T, Key, Hash >::find().
const T * lookup | ( | const word & | keyword ) | const |
Find and return entry.
Definition at line 136 of file DictionaryBase.C.
References HashTable< T, Key, Hash >::end(), Foam::exit(), Foam::FatalError, FatalErrorIn, and HashTable< T, Key, Hash >::find().
Referenced by DictionaryBase< DLPtrList< T >, T >::operator[]().
T * lookup | ( | const word & | keyword ) |
Find and return entry.
Definition at line 155 of file DictionaryBase.C.
References HashTable< T, Key, Hash >::end(), Foam::exit(), Foam::FatalError, FatalErrorIn, and HashTable< T, Key, Hash >::find().
Foam::wordList toc | ( | ) | const |
Return the table of contents.
Definition at line 174 of file DictionaryBase.C.
void insert | ( | const word & | keyword, |
T * | tPtr | ||
) |
void append | ( | const word & | keyword, |
T * | tPtr | ||
) |
T * remove | ( | const word & | keyword ) |
Remove and return entry specified by keyword.
Return NULL if the keyword was not found.
Definition at line 214 of file DictionaryBase.C.
References HashTable< T, Key, Hash >::end(), HashTable< T, Key, Hash >::find(), and Foam::T().
void clear | ( | ) |
void transfer | ( | DictionaryBase< IDLListType, T > & | dict ) |
Transfer the contents of the argument into this DictionaryBase.
and annull the argument.
Definition at line 241 of file DictionaryBase.C.
void operator= | ( | const DictionaryBase< IDLListType, T > & | ) |
const T* operator[] | ( | const word & | key ) | const [inline]
|
Find and return entry.
Definition at line 154 of file DictionaryBase.H.
T* operator[] | ( | const word & | key ) | [inline]
|
Find and return entry.
Definition at line 160 of file DictionaryBase.H.
Ostream& operator | ( | Ostream & | , |
const DictionaryBase< IDLListType, T > & | |||
) | [friend]
|