Go to the documentation of this file.
36 #ifndef registerSwitch_H
37 #define registerSwitch_H
92 #define registerOptSwitch(Name, Type, SwitchVar) \
93 static Foam::RegisterSwitch<Type> FILE_UNIQUE(_addToOpt_) \
94 (Foam::debug::addOptimisationObject, Name, SwitchVar)
97 #define registerInfoSwitch(Name, Type, SwitchVar) \
98 static Foam::RegisterSwitch<Type> FILE_UNIQUE(_addToOpt_) \
99 (Foam::debug::addInfoObject, Name, SwitchVar)
General C-preprocessor macros.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Type & value
Reference to the switch variable that has been registered.
OBJstream os(runTime.globalPath()/outputName)
Class and registration macros for InfoSwitches and OptimisationSwitches to support reading from syste...
virtual void writeData(Ostream &os) const
Write.
RegisterSwitch(void(*registryFn)(const char *name, simpleRegIOobject *), const char *name, Type &switchVar)
virtual void readData(Istream &is)
Read.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
virtual ~RegisterSwitch()=default
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
simpleRegIOobject(void(*fn)(const char *name, simpleRegIOobject *), const char *name)
Construct from objectregistry inserter and name.
Abstract base class for registered object with I/O. Used in debug symbol registration.