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;
225 virtual ITstream&
stream()
const = 0;
282 template<
class T,
class Predicate>
286 readCheck<T>(val, pred);
295 template<
class T,
class Predicate>
Template class for intrusive linked lists.
void readEntry(T &val) const
Assign to T val, FatalIOError if the number of tokens is incorrect.
A class for handling keywords in dictionaries.
entry(const keyType &keyword)
Construct from keyword.
virtual fileName relativeName() const =0
Return the entry name relative to the current case.
virtual ITstream * streamPtr() const noexcept
Return pointer to token stream, if it is a primitive entry, otherwise return nullptr.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
friend Ostream & operator<<(Ostream &os, const entry &e)
void operator=(const entry &e)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
virtual label startLineNumber() const =0
Return line number of first token in dictionary.
void readCheck(T &val, const Predicate &pred) const
Assign to T val, FatalIOError if the number of tokens is incorrect.
A token holds an item read from Istream.
virtual const dictionary * dictPtr() const noexcept
Return pointer to dictionary, if entry is a dictionary, otherwise return nullptr. ...
virtual const dictionary & dict() const =0
Return dictionary, if entry is a dictionary, otherwise Fatal.
void checkITstream(const ITstream &is) const
Check after reading if the input token stream has unconsumed tokens remaining or if there were no tok...
inputMode
The input mode options.
static void resetInputMode()
Reset the globalInputMode to merge.
bool operator!=(const entry &e) const
static void reportReadWarning(const IOstream &, const std::string &)
Report a read warning (on std::cerr)
static int disableFunctionEntries
Enable or disable use of function entries and variable expansions.
const dimensionedScalar e
Elementary charge.
const keyType & keyword() const noexcept
Return keyword.
Intrusive doubly-linked list.
virtual void write(Ostream &os) const =0
Write.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Use global value from globalInputMode variable.
virtual ~entry()=default
Destructor.
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.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc.
virtual autoPtr< entry > clone() const
Construct on freestore as copy.
virtual bool isStream() const noexcept
True if this entry is a stream.
static inputMode globalInputMode
The current global input-mode.
Merge sub-dictionaries when possible.
Keep last entry. Silently remove previous ones.
virtual const fileName & name() const =0
Return the entry name.
bool operator==(const entry &e) const
virtual bool isDict() const noexcept
True if this entry is a dictionary.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
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.
FatalError for duplicate entries.
virtual ITstream & stream() const =0
Return token stream, if entry is a primitive entry.
Keep initial entry. Silently ignore subsequent ones.
An input stream of tokens.
A keyword and a list of tokens is an 'entry'.
Keep initial entry. Warn about subsequent ones.