30 template<
class IDLListType,
class T>
35 typename IDLListType::iterator iter = this->begin();
40 this->hashedTs_.insert((*iter).keyword(), &(*iter));
47 template<
class IDLListType,
class T>
54 template<
class IDLListType,
class T>
66 template<
class IDLListType,
class T>
80 template<
class IDLListType,
class T>
91 template<
class IDLListType,
class T>
98 template<
class IDLListType,
class T>
117 template<
class IDLListType,
class T>
133 template<
class IDLListType,
class T>
141 << keyword <<
" is undefined" 149 template<
class IDLListType,
class T>
157 << keyword <<
" is undefined" 165 template<
class IDLListType,
class T>
173 typename IDLListType::const_iterator iter = this->begin();
178 keywords[i++] = iter().keyword();
185 template<
class IDLListType,
class T>
192 template<
class IDLListType,
class T>
201 template<
class IDLListType,
class T>
206 IDLListType::append(tPtr);
210 template<
class IDLListType,
class T>
217 T* tPtr = IDLListType::remove(iter());
228 template<
class IDLListType,
class T>
236 template<
class IDLListType,
class T>
242 IDLListType::transfer(dict);
249 template<
class IDLListType,
class T>
250 void Foam::DictionaryBase<IDLListType, T>::operator=
259 <<
"attempted assignment to self" 263 IDLListType::operator=(dict);
bool found(const word &) const
Search DictionaryBase for given keyword.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
Base dictionary class templated on both the form of doubly-linked list it uses as well as the type it...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Reads the data description and data portions of a DictionaryBase File.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
void transfer(HashTable< T, Key, Hash > &)
Transfer the contents of the argument table into this table.
void append(const word &, T *)
Add at tail of dictionary.
DictionaryBase(const label size=128)
Construct given initial table size.
bool erase(const iterator &)
Erase a hashedEntry specified by given iterator.
const T * lookup(const word &) const
Find and return entry.
void insert(const word &, T *)
Add at head of dictionary.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
A class for handling words, derived from string.
void clear()
Clear all entries from table.
timeIndices insert(timeIndex, timeDirs[timeI].value())
HashTable< T * > hashedTs_
HashTable of the entries held on the IDLListType for quick lookup.
void clear()
Clear the dictionary.
An STL-conforming hash table.
errorManip< error > abort(error &err)
bool found(const Key &) const
Return true if hashedEntry is found in table.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
wordList toc() const
Return the table of contents.
T * remove(const word &)
Remove and return entry specified by keyword.
wordList sortedToc() const
Return the table of contents as a sorted list.
void transfer(DictionaryBase< IDLListType, T > &)
Transfer the contents of the argument into this DictionaryBase.
List< Key > sortedToc() const
Return the table of contents as a sorted list.
A helper class when constructing from an Istream or dictionary.
const T * lookupPtr(const word &) const
Find and return an entry if present, otherwise return NULL.