RegisterSwitch< Type > Class Template Reference

Class and registration macros for InfoSwitches and OptimisationSwitches to support reading from system/controlDict and dynamic update. More...

Inheritance diagram for RegisterSwitch< Type >:
[legend]
Collaboration diagram for RegisterSwitch< Type >:
[legend]

Public Member Functions

 RegisterSwitch (void(*registryFn)(const char *name, simpleRegIOobject *), const char *name, Type &switchVar)
 
virtual ~RegisterSwitch ()=default
 
virtual void readData (Istream &is)
 Read. More...
 
virtual void writeData (Ostream &os) const
 Write. More...
 
- Public Member Functions inherited from simpleRegIOobject
 simpleRegIOobject (void(*fn)(const char *name, simpleRegIOobject *), const char *name)
 Construct from objectregistry inserter and name. More...
 
virtual ~simpleRegIOobject ()=default
 Destructor. More...
 

Public Attributes

Type & value
 Reference to the switch variable that has been registered. More...
 

Detailed Description

template<class Type>
class Foam::RegisterSwitch< Type >

Class and registration macros for InfoSwitches and OptimisationSwitches to support reading from system/controlDict and dynamic update.

Definition at line 51 of file registerSwitch.H.

Constructor & Destructor Documentation

◆ RegisterSwitch()

RegisterSwitch ( void(*)(const char *name, simpleRegIOobject *)  registryFn,
const char *  name,
Type &  switchVar 
)
inline

Definition at line 61 of file registerSwitch.H.

◆ ~RegisterSwitch()

virtual ~RegisterSwitch ( )
virtualdefault

Member Function Documentation

◆ readData()

virtual void readData ( Istream is)
inlinevirtual

Read.

Implements simpleRegIOobject.

Definition at line 73 of file registerSwitch.H.

References RegisterSwitch< Type >::value.

◆ writeData()

virtual void writeData ( Ostream os) const
inlinevirtual

Write.

Implements simpleRegIOobject.

Definition at line 78 of file registerSwitch.H.

References os(), and RegisterSwitch< Type >::value.

Here is the call graph for this function:

Member Data Documentation

◆ value

Type& value

Reference to the switch variable that has been registered.

Definition at line 58 of file registerSwitch.H.

Referenced by RegisterSwitch< Type >::readData(), and RegisterSwitch< Type >::writeData().


The documentation for this class was generated from the following file: