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>
72 IDLListType(move(
dict)),
73 hashedTs_(move(
dict.hashedTs_))
77 template<
class IDLListType,
class T>
91 template<
class IDLListType,
class T>
102 template<
class IDLListType,
class T>
105 return hashedTs_.found(keyword);
109 template<
class IDLListType,
class T>
117 if (iter != hashedTs_.end())
128 template<
class IDLListType,
class T>
133 if (iter != hashedTs_.end())
144 template<
class IDLListType,
class T>
149 if (iter == hashedTs_.end())
152 << keyword <<
" is undefined"
160 template<
class IDLListType,
class T>
165 if (iter == hashedTs_.
end())
168 << keyword <<
" is undefined"
176 template<
class IDLListType,
class T>
184 typename IDLListType::const_iterator iter = this->begin();
189 keywords[i++] = iter().keyword();
196 template<
class IDLListType,
class T>
199 return hashedTs_.sortedToc();
203 template<
class IDLListType,
class T>
207 hashedTs_.insert(keyword, tPtr);
212 template<
class IDLListType,
class T>
216 hashedTs_.insert(keyword, tPtr);
217 IDLListType::append(tPtr);
221 template<
class IDLListType,
class T>
226 if (iter != hashedTs_.
end())
228 T* tPtr = IDLListType::remove(iter());
229 hashedTs_.erase(iter);
239 template<
class IDLListType,
class T>
247 template<
class IDLListType,
class T>
253 IDLListType::transfer(
dict);
254 hashedTs_.transfer(
dict.hashedTs_);
260 template<
class IDLListType,
class T>
270 <<
"attempted assignment to self"
274 IDLListType::operator=(
dict);
275 this->hashedTs_.clear();
Reads the data description and data portions of a DictionaryBase File.
Base dictionary class templated on both the form of doubly-linked list it uses as well as the type it...
bool found(const word &) const
Search DictionaryBase for given keyword.
void insert(const word &, T *)
Add at head of dictionary.
void transfer(DictionaryBase< IDLListType, T > &)
Transfer the contents of the argument into this DictionaryBase.
DictionaryBase(const label size=128)
Construct given initial table size.
void append(const word &, T *)
Add at tail of dictionary.
const T * lookup(const word &) const
Find and return entry.
const T * lookupPtr(const word &) const
Find and return an entry if present, otherwise return nullptr.
wordList sortedToc() const
Return the table of contents as a sorted list.
void clear()
Clear the dictionary.
wordList toc() const
Return the table of contents.
T * remove(const word &)
Remove and return entry specified by keyword.
An STL-conforming hash table.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
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)....
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void insert(const scalar, DynamicList< floatScalar > &)
Append scalar to given DynamicList.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable