40#ifndef functionObjects_runTimeControls_runTimeCondition_H
41#define functionObjects_runTimeControls_runTimeCondition_H
53namespace functionObjects
55namespace 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;
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
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,...
Base class for run time conditions.
Switch log
Switch to send output to Info.
bool active_
On/off switch.
virtual void reset()=0
Reset.
declareRunTimeSelectionTable(autoPtr, runTimeCondition, dictionary,(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state),(name, obr, dict, state))
Declare runtime constructor selection table.
const objectRegistry & obr_
Reference to the object registry.
word name_
Condition name.
dictionary & conditionDict_
Reference to the condition dictionary.
dictionary & setConditionDict()
Set the condition dictionary (create if necessary)
label groupID_
Group index - if applied, all conditions in a group must be.
virtual ~runTimeCondition()=default
Destructor.
virtual label groupID() const
Return the group index.
virtual void write()=0
Write.
const dictionary & conditionDict() const
Return const access to the conditions dictionary.
virtual bool apply()=0
Apply the condition.
static autoPtr< runTimeCondition > New(const word &conditionName, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
Selector.
stateFunctionObject & state_
State.
virtual bool active() const
Return the active flag.
TypeName("runTimeCondition")
Runtime type information.
virtual const word & name() const
Return the condition name.
Base class for function objects, adding functionality to read/write state information (data required ...
Registry of regIOobjects.
A class for handling words, derived from Foam::string.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.