Go to the documentation of this file.
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>
57 const DictionaryBase&
dict
66 template<
class IDLListType,
class T>
80 template<
class IDLListType,
class T>
92 template<
class IDLListType,
class T>
95 return hashedTs_.found(keyword);
100 template<
class IDLListType,
class T>
108 if (iter != hashedTs_.end())
120 template<
class IDLListType,
class T>
125 if (iter != hashedTs_.end())
137 template<
class IDLListType,
class T>
142 if (iter == hashedTs_.end())
145 << keyword <<
" is undefined"
154 template<
class IDLListType,
class T>
159 if (iter == hashedTs_.end())
162 << keyword <<
" is undefined"
171 template<
class IDLListType,
class T>
179 typename IDLListType::const_iterator iter = this->begin();
184 keywords[i++] = iter().keyword();
192 template<
class IDLListType,
class T>
196 hashedTs_.insert(keyword, tPtr);
202 template<
class IDLListType,
class T>
206 hashedTs_.insert(keyword, tPtr);
207 IDLListType::append(tPtr);
211 template<
class IDLListType,
class T>
216 if (iter != hashedTs_.end())
218 T* tPtr = IDLListType::remove(iter());
219 hashedTs_.erase(iter);
229 template<
class IDLListType,
class T>
237 template<
class IDLListType,
class T>
243 IDLListType::transfer(
dict);
244 hashedTs_.transfer(
dict.hashedTs_);
250 template<
class IDLListType,
class T>
260 <<
"attempted assignment to self"
264 IDLListType::operator=(
dict);
265 this->hashedTs_.clear();
friend class iterator
Declare friendship with the iterator.
A class for handling words, derived from string.
wordList toc() const
Return the table of contents.
const T * lookupPtr(const word &) const
Find and return an entry if present, otherwise return NULL.
friend class const_iterator
Declare friendship with the const_iterator.
void append(const word &, T *)
Add at tail of dictionary.
A helper class when constructing from an Istream or dictionary.
void insert(const word &, T *)
Add at head of dictionary.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
DictionaryBase(const label size=128)
Construct given initial table size.
T * remove(const word &)
Remove and return entry specified by keyword.
errorManip< error > abort(error &err)
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
errorManipArg< error, int > exit(error &err, const int errNo=1)
An STL-conforming hash table.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Reads the data description and data portions of a DictionaryBase File.
void clear()
Clear the dictionary.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Base dictionary class templated on both the form of doubly-linked list it uses as well as the type it...
const T * lookup(const word &) const
Find and return entry.
bool found(const word &) const
Search DictionaryBase for given keyword.
void transfer(DictionaryBase< IDLListType, T > &)
Transfer the contents of the argument into this DictionaryBase.
timeIndices insert(timeIndex, timeDirs[timeI].value())