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;
167 virtual void reset() = 0;
virtual bool apply()=0
Apply the condition.
virtual void write()=0
Write.
Switch log
Switch to send output to Info.
const objectRegistry & obr_
Reference to the object registry.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
word name_
Condition name.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
virtual ~runTimeCondition()=default
Destructor.
dictionary & setConditionDict()
Set the condition dictionary (create if necessary)
declareRunTimeSelectionTable(autoPtr, runTimeCondition, dictionary,(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state),(name, obr, dict, state))
Declare runtime constructor selection table.
virtual void reset()=0
Reset.
TypeName("runTimeCondition")
Runtime type information.
A class for handling words, derived from Foam::string.
Base class for run time conditions.
stateFunctionObject & state_
State.
dictionary & conditionDict_
Reference to the condition dictionary.
label groupID_
Group index - if applied, all conditions in a group must be.
runTimeCondition(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
Constructor.
bool active_
On/off switch.
Base class for function objects, adding functionality to read/write state information (data required ...
static autoPtr< runTimeCondition > New(const word &conditionName, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
Selector.
virtual bool active() const
Return the active flag.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Macros to ease declaration of run-time selection tables.
virtual label groupID() const
Return the group index.
Registry of regIOobjects.
const dictionary & conditionDict() const
Return const access to the conditions dictionary.
virtual const word & name() const
Return the condition name.