Go to the documentation of this file.
33 template<
class IDLListType,
class T>
36 for (
auto iter = this->
begin(); iter != this->
end(); ++iter)
38 this->hashedTs_.insert((*iter).keyword(), &(*iter));
45 template<
class IDLListType,
class T>
52 template<
class IDLListType,
class T>
64 template<
class IDLListType,
class T>
78 template<
class IDLListType,
class T>
89 template<
class IDLListType,
class T>
92 return hashedTs_.found(keyword);
96 template<
class IDLListType,
class T>
102 const auto iter = hashedTs_.cfind(keyword);
113 template<
class IDLListType,
class T>
116 auto iter = hashedTs_.find(keyword);
127 template<
class IDLListType,
class T>
130 const auto iter = hashedTs_.cfind(keyword);
135 <<
"'" << keyword <<
"' not found"
143 template<
class IDLListType,
class T>
146 auto iter = hashedTs_.find(keyword);
151 <<
"'" << keyword <<
"' not found"
159 template<
class IDLListType,
class T>
165 return hashedTs_.sortedToc();
169 template<
class IDLListType,
class T>
172 return hashedTs_.sortedToc();
176 template<
class IDLListType,
class T>
177 template<
class Compare>
183 return hashedTs_.sortedToc(comp);
187 template<
class IDLListType,
class T>
191 hashedTs_.insert(keyword, tPtr);
196 template<
class IDLListType,
class T>
200 hashedTs_.insert(keyword, tPtr);
205 template<
class IDLListType,
class T>
208 auto iter = hashedTs_.find(keyword);
212 T* ptr = IDLListType::remove(iter());
213 hashedTs_.erase(iter);
221 template<
class IDLListType,
class T>
229 template<
class IDLListType,
class T>
240 IDLListType::transfer(
dict);
241 hashedTs_.transfer(
dict.hashedTs_);
247 template<
class IDLListType,
class T>
258 IDLListType::operator=(
dict);
259 this->hashedTs_.clear();
srcOptions insert("case", fileName(rootDirSource/caseDirSource))
A class for handling words, derived from Foam::string.
constexpr auto begin(C &c) -> decltype(c.begin())
Return iterator to the beginning of the container c.
wordList toc() const
Return the table of contents (as a sorted list)
void transfer(DictionaryBase< IDLListType, T > &dict)
Transfer the contents of the argument into this DictionaryBase.
wordList sortedToc() const
Return the table of contents as a sorted list.
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)....
DictionaryBase(const label size=128)
Construct with given or default (128) table capacity.
T * remove(const word &keyword)
Remove and return entry specified by keyword.
bool found(const word &keyword) const
Search for given keyword.
void append(const word &keyword, T *)
Add at tail of dictionary.
const T * lookup(const word &keyword) const
Find and return entry, FatalError on failure.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
T * find(const word &keyword)
Find and return an entry, nullptr on failure.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void insert(const word &keyword, T *)
Add at head of dictionary.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void clear()
Clear the dictionary.
Base dictionary class templated on both the form of doubly-linked list it uses as well as the type it...
const T * cfind(const word &keyword) const
Find and return an entry, nullptr on failure.
rAUs append(new volScalarField(IOobject::groupName("rAU", phase1.name()), 1.0/(U1Eqn.A()+byDt(max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1))))