36 std::initializer_list<std::pair<const char*,int>> compat,
47 for (
const std::pair<const char*,int>& alt : compat)
56 <<
"--> FOAM IOWarning :" <<
nl 57 <<
" Found [v" << alt.second <<
"] '" 58 << alt.first <<
"' entry instead of '" 59 << keyword.c_str() <<
"' in dictionary \"" 77 std::initializer_list<std::pair<const char*,int>> compat,
81 return csearchCompat(keyword, compat, matchOpt).ptr();
88 std::initializer_list<std::pair<const char*,int>> compat,
92 return static_cast<bool>(findCompat(keyword, compat, matchOpt));
99 std::initializer_list<std::pair<const char*,int>> compat,
103 const entry* eptr = findCompat(keyword, compat, matchOpt);
108 <<
"Entry '" << keyword <<
"' not found in dictionary " 120 std::initializer_list<std::pair<const char*,int>> compat,
124 return lookupEntryCompat(keyword, compat, matchOpt).stream();
static word validate(const std::string &s, const bool prefix=false)
Construct validated word (no invalid characters).
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool warnAboutAge(const int version) noexcept
Test if an age warning should be emitted.
static bool master(const label communicator=-1)
Like Pstream::master but with a Pstream::parRun guard in case Pstream has not yet been initialised...
Generic const/non-const dictionary entry searcher.
bool good() const noexcept
True if entry was found.
A class for handling words, derived from Foam::string.
const_searcher csearchCompat(const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option matchOpt=keyType::REGEX) const
Search dictionary for given keyword and any compatibility names.
ITstream & lookupCompat(const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option matchOpt=keyType::REGEX) const
Find and return an entry data stream, using any compatibility names if needed.
const entry * findCompat(const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option matchOpt) const
Find and return an entry pointer if present, or return a nullptr, using any compatibility names if ne...
fileName relativeName(const bool caseTag=false) const
The dictionary name relative to the case.
bool foundCompat(const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option matchOpt=keyType::REGEX) const
Search dictionary for given keyword and any compatibility names.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
option
Enumeration for the data type and search/match modes (bitmask)
const_searcher csearch(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search dictionary for given keyword.
const entry & lookupEntryCompat(const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option matchOpt) const
Find and return an entry if present, otherwise FatalIOError, using any compatibility names if needed...
An input stream of tokens.
A keyword and a list of tokens is an 'entry'.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...