100 static bool getKeyword
114 void raiseBadInput(
const ITstream& is)
const;
165 const int endChar = 0
190 virtual ~entry() =
default;
202 virtual const fileName&
name()
const = 0;
205 virtual fileName&
name() = 0;
282 template<
class T,
class Predicate>
295 template<
class T,
class Predicate>
Intrusive doubly-linked list.
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'.
entry(const keyType &keyword)
Construct from keyword.
virtual dictionary * dictPtr() noexcept
Return non-const pointer to dictionary, if entry is a dictionary, otherwise return nullptr.
void readEntry(T &val) const
Assign to T val, FatalIOError if the number of tokens is incorrect.
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
True if this entry is a dictionary.
void readCheck(T &val, const Predicate &pred) const
Assign to T val, FatalIOError if the number of tokens is incorrect.
virtual bool isStream() const noexcept
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
Check after reading if the input token stream has unconsumed tokens remaining or if there were no tok...
virtual dictionary & dict()=0
Return non-const access to dictionary, if entry is a dictionary, otherwise Fatal.
keyType & keyword() noexcept
Return non-const access to keyword.
virtual const fileName & name() const =0
Return the entry name.
virtual autoPtr< entry > clone(const dictionary &parentDict) const =0
Construct on freestore as copy with reference to the.
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, otherwise return nullptr.
virtual ITstream * streamPtr() const noexcept
Return pointer to token stream, if it is a primitive entry, otherwise return nullptr.
virtual const dictionary & dict() const =0
Return dictionary, if entry is a dictionary, otherwise Fatal.
bool operator==(const entry &e) const
T getCheck(const Predicate &pred) const
Get a T from the stream, FatalIOError if the number of tokens is incorrect.
virtual label endLineNumber() const =0
Return line number of last token in dictionary.
virtual void write(Ostream &os) const =0
Write.
T get() const
Get a T from the stream, FatalIOError if the number of tokens is incorrect.
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)
ILList< DLListBase, T > IDLList
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
link() noexcept=default
Default construct.