40 int old(writeOptionalEntries);
41 writeOptionalEntries = level;
62 word scopedName(name_.name());
64 const auto i = scopedName.rfind(
'.');
65 if (i == std::string::npos)
70 return scopedName.substr(i+1);
92 return csearch(keyword, matchOpt).ptr();
102 return const_cast<entry*
>(csearch(keyword, matchOpt).ptr());
112 return static_cast<bool>(
findEntry(keyword, matchOpt));
122 return csearchScoped(keyword, matchOpt).ptr();
132 return csearch(keyword, matchOpt).dictPtr();
142 return const_cast<dictionary*
>(csearch(keyword, matchOpt).dictPtr());
152 return static_cast<bool>(findDict(keyword, matchOpt));
word dictName() const
The local dictionary name (final part of scoped name)
static int reportOptional() noexcept
Return the state of reporting optional (default) entries.
A class for handling file names.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const fileName & name() const noexcept
The dictionary name.
const entry * findScoped(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for a scoped entry (const access) with the given keyword.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry (const access) with the given keyword.
const dictionary & parent() const noexcept
Return the parent dictionary.
A class for handling words, derived from Foam::string.
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
static int writeOptionalEntries
Report optional keywords and values if not present in dictionary.
bool isDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find a sub-dictionary.
option
Enumeration for the data type and search/match modes (bitmask)
const entry * findEntry(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry (const access) with the given keyword.
bool isNullDict() const noexcept
The dictionary is actually dictionary::null (root dictionary)
A keyword and a list of tokens is an 'entry'.
const dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary pointer if present (and a sub-dictionary) otherwise return nullptr...