100 static bool getKeyword
114 void raiseBadInput(
const ITstream& is)
const;
165 const int endChar = 0
190 virtual ~entry() =
default;
294 template<
class T,
class Predicate>
298 readCheck<T>(val, pred);
307 template<
class T,
class Predicate>
308 void readCheck(
T& val,
const Predicate& pred)
const
Intrusive doubly-linked list.
Template class for intrusive linked lists.
An IOstream is an abstract base class for all input/output systems; be they streams,...
An input stream of tokens.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A keyword and a list of tokens is an 'entry'.
void readEntry(T &val) const
virtual ITstream & stream() const =0
Return token stream, if entry is a primitive entry.
static void resetInputMode()
Reset the globalInputMode to merge.
void operator=(const entry &e)
virtual ~entry()=default
Destructor.
virtual bool isDict() const noexcept
Return true if this entry is a dictionary.
void readCheck(T &val, const Predicate &pred) const
virtual bool isStream() const noexcept
Return true if this entry is a stream.
friend Ostream & operator<<(Ostream &os, const entry &e)
virtual label startLineNumber() const =0
Return line number of first token in dictionary.
virtual autoPtr< entry > clone() const
Construct on freestore as copy.
bool operator!=(const entry &e) const
static bool New(dictionary &parentDict, Istream &is, const inputMode inpMode=inputMode::GLOBAL, const int endChar=0)
Construct from an Istream and insert into the dictionary.
virtual fileName & name()=0
Return the entry name for modification.
void checkITstream(const ITstream &is) const
virtual dictionary & dict()=0
Return non-const access to dictionary, if entry is a dictionary.
keyType & keyword() noexcept
Return non-const access to keyword.
virtual const fileName & name() const =0
Return the entry name.
static inputMode globalInputMode
The current global input-mode.
inputMode
The input mode options.
@ OVERWRITE
Keep last entry. Silently remove previous ones.
@ PROTECT
Keep initial entry. Silently ignore subsequent ones.
@ WARN
Keep initial entry. Warn about subsequent ones.
@ GLOBAL
Use global value from globalInputMode variable.
@ MERGE
Merge sub-dictionaries when possible.
@ ERROR
FatalError for duplicate entries.
virtual fileName relativeName() const =0
Return the entry name relative to the current case.
const keyType & keyword() const noexcept
Return keyword.
static void reportReadWarning(const IOstream &, const std::string &)
Report a read warning (on std::cerr)
virtual const dictionary * dictPtr() const noexcept
Return pointer to dictionary, if entry is a dictionary.
virtual const dictionary & dict() const =0
Return dictionary, if entry is a dictionary.
bool operator==(const entry &e) const
T getCheck(const Predicate &pred) const
virtual label endLineNumber() const =0
Return line number of last token in dictionary.
virtual void write(Ostream &os) const =0
Write.
static int disableFunctionEntries
Enable or disable use of function entries and variable expansions.
A class for handling file names.
A class for handling keywords in dictionaries.
A token holds an item read from Istream.
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)