Loading...
Searching...
No Matches
RegisterSwitch< Type > Class Template Reference

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

#include <registerSwitch.H>

Inheritance diagram for RegisterSwitch< Type >:
Collaboration diagram for RegisterSwitch< Type >:

Public Member Functions

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

Public Attributes

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

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 45 of file registerSwitch.H.

Constructor & Destructor Documentation

◆ RegisterSwitch()

template<class Type>
RegisterSwitch ( void(* registryFn )(const char *name, simpleRegIOobject *),
const char * name,
Type & switchVar )
inline

Definition at line 56 of file registerSwitch.H.

References Foam::name(), simpleRegIOobject::simpleRegIOobject(), and value.

Here is the call graph for this function:

◆ ~RegisterSwitch()

template<class Type>
virtual ~RegisterSwitch ( )
virtualdefault

Member Function Documentation

◆ readData()

template<class Type>
virtual void readData ( Istream & is)
inlinevirtual

Read.

Implements simpleRegIOobject.

Definition at line 69 of file registerSwitch.H.

References value.

◆ writeData()

template<class Type>
virtual void writeData ( Ostream & os) const
inlinevirtual

Write.

Implements simpleRegIOobject.

Definition at line 74 of file registerSwitch.H.

References os(), and value.

Here is the call graph for this function:

Member Data Documentation

◆ value

template<class Type>
Type& value

Reference to the switch variable that has been registered.

Definition at line 54 of file registerSwitch.H.

Referenced by readData(), RegisterSwitch(), and writeData().


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