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,
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();
An input stream of tokens.
bool good() const noexcept
True if entry was found.
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...
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.
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.
fileName relativeName(const bool caseTag=false) const
The dictionary name relative to the case.
friend class entry
Declare friendship with the entry class for IO.
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 & 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.
const_searcher csearch(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search dictionary for given keyword.
Searcher< true > const_searcher
Searcher with const access.
A keyword and a list of tokens is an 'entry'.
static bool master(const int communicator=-1)
Like Pstream::master but with a Pstream::parRun guard in case Pstream has not yet been initialised.
static bool warnAboutAge(const int version) noexcept
Test if an age warning should be emitted.
option
Enumeration for the data type and search/match modes (bitmask).
A class for handling words, derived from Foam::string.
static word validate(const std::string &s, const bool prefix=false)
Construct validated word (no invalid characters).
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).