Go to the documentation of this file.
40 #ifndef functionObjects_runTimeControls_runTimeCondition_H
41 #define functionObjects_runTimeControls_runTimeCondition_H
53 namespace functionObjects
55 namespace runTimeControls
137 const word& conditionName,
155 virtual bool active()
const;
161 virtual bool apply() = 0;
164 virtual void write() = 0;
virtual const word & name() const
Return the condition name.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Base class for run time conditions.
A class for handling words, derived from Foam::string.
bool active_
On/off switch.
Base class for function objects, adding functionality to read/write state information (data required ...
virtual ~runTimeCondition()=default
Destructor.
stateFunctionObject & state_
State.
Registry of regIOobjects.
const dictionary & conditionDict() const
Return const access to the conditions dictionary.
static autoPtr< runTimeCondition > New(const word &conditionName, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
Selector.
const objectRegistry & obr_
Reference to the object registry.
label groupID_
Group index - if applied, all conditions in a group must be.
dictionary & setConditionDict()
Set the condition dictionary (create if necessary)
runTimeCondition(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
Constructor.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dictionary & conditionDict_
Reference to the condition dictionary.
declareRunTimeSelectionTable(autoPtr, runTimeCondition, dictionary,(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state),(name, obr, dict, state))
Declare runtime constructor selection table.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Macros to ease declaration of run-time selection tables.
virtual void write()=0
Write.
virtual label groupID() const
Return the group index.
word name_
Condition name.
virtual bool active() const
Return the active flag.
TypeName("runTimeCondition")
Runtime type information.
Switch log
Switch to send output to Info.
virtual bool apply()=0
Apply the condition.