FlowDeviceFactory Class Reference#
Public Member Functions |
Static Public Member Functions |
Static Private Attributes |
List of all members
FlowDeviceFactory Class Reference
Factory class to create FlowDevice objects. More...
#include <FlowDeviceFactory.h>
Inheritance diagram for FlowDeviceFactory:
Detailed Description
Factory class to create FlowDevice objects.
This class is mainly used via the newFlowDevice() function, for example:
shared_ptr<FlowDevice> mfc = newFlowDevice("MassFlowController");
shared_ptr< FlowDevice > newFlowDevice(const string &model)
Create a FlowDevice object of the specified type.
Definition FlowDeviceFactory.cpp:36
Definition at line 22 of file FlowDeviceFactory.h.
Public Member Functions | |
void | deleteFactory () override |
Virtual abstract function that deletes the factory. | |
Public Member Functions inherited from Factory< FlowDevice > | |
FlowDevice * | create (const string &name, Args... args) |
Create an object using the object construction function corresponding to "name" and the provided constructor arguments. | |
void | reg (const string &name, function< FlowDevice *(Args...)> f) |
Register a new object construction function. | |
void | addAlias (const string &original, const string &alias) |
Add an alias for an existing registered type. | |
string | canonicalize (const string &name) |
Get the canonical name registered for a type. | |
bool | exists (const string &name) const |
Returns true if name is registered with this factory. | |
Public Member Functions inherited from FactoryBase | |
virtual | ~FactoryBase () |
destructor | |
Static Public Member Functions | |
static FlowDeviceFactory * | factory () |
Static Public Member Functions inherited from FactoryBase | |
static void | deleteFactories () |
static function that deletes all factories in the internal registry maintained in a static variable | |
Static Private Attributes | |
static FlowDeviceFactory * | s_factory = 0 |
static std::mutex | flowDevice_mutex |
Additional Inherited Members | |
Protected Member Functions inherited from Factory< FlowDevice > | |
void | addDeprecatedAlias (const string &original, const string &alias) |
Add a deprecated alias for an existing registered type. | |
Protected Member Functions inherited from FactoryBase | |
FactoryBase () | |
Constructor. | |
virtual void | deleteFactory ()=0 |
Virtual abstract function that deletes the factory. | |
Constructor & Destructor Documentation
◆ FlowDeviceFactory()
|
private |
Definition at line 15 of file FlowDeviceFactory.cpp.
Member Function Documentation
◆ factory()
|
static |
Definition at line 22 of file FlowDeviceFactory.cpp.
◆ deleteFactory()
|
overridevirtual |
Virtual abstract function that deletes the factory.
This must be properly defined in child objects.
Implements FactoryBase.
Definition at line 30 of file FlowDeviceFactory.cpp.
Member Data Documentation
◆ s_factory
|
staticprivate |
Definition at line 30 of file FlowDeviceFactory.h.
◆ flowDevice_mutex
|
staticprivate |
Definition at line 31 of file FlowDeviceFactory.h.
The documentation for this class was generated from the following files:
Generated by 1.9.7