This class is responsible for the instantiation of all the devices, global-device and domain-store. The DeviceFactory is designed as a bridge pattern to allow sub-classing of the class interface (this one) and the class implementation (DeviceFactoryImp) separately. More...
#include <DeviceFactory.h>
Public Member Functions | |
DevInstType * | getDevice (const std::string &deviceName) |
this method retrieves the device instance by its name | |
GlobalDeviceType * | getGlobalDevice () |
this method retrieves the global-device instance | |
const std::vector< DevInstType * > & | getDeviceCollection () |
this method retrieves all concrete-devices | |
~DeviceFactory () | |
destructor | |
Protected Member Functions | |
DeviceFactory (const std::string &className) | |
Constructor. | |
Static Protected Attributes | |
static DeviceFactory * | instance_ |
unique instance of the derived-class which will be a singleton | |
Private Attributes | |
DeviceFactoryImp < GlobalDeviceType, DomainStoreType, DevInstType > * | imp_ |
reference to device-factory implementation class, respecting the bridge design pattern |
This class is responsible for the instantiation of all the devices, global-device and domain-store. The DeviceFactory is designed as a bridge pattern to allow sub-classing of the class interface (this one) and the class implementation (DeviceFactoryImp) separately.
GlobalDeviceType | is the type of the concrete GlobalDevice class | |
DevInstType | is the type of the concrete Device class | |
DomainStoreType | is the type of the concrete DomainStore class |
Definition at line 27 of file DeviceFactory.h.
fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::~DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType > | ( | ) | [inline] |
destructor
fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::DeviceFactory | ( | const std::string & | className | ) | [inline, protected] |
Constructor.
className | name of the class that contains this device factory |
The device-factory constructor is responsible to instantiate its implementation class.
Definition at line 81 of file DeviceFactory.h.
References fesa::AbstractEquipment::getInstance(), fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::imp_, fesa::AbstractDeviceFactory::pAbstractDeviceCol_, and fesa::unsplit.
DevInstType * fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::getDevice | ( | const std::string & | deviceName | ) | [inline, virtual] |
this method retrieves the device instance by its name
deviceName | the name of the device |
Implements fesa::AbstractDeviceFactory.
Definition at line 112 of file DeviceFactory.h.
References fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::imp_.
const std::vector< DevInstType * > & fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::getDeviceCollection | ( | ) | [inline] |
this method retrieves all concrete-devices
Definition at line 125 of file DeviceFactory.h.
References fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::imp_.
GlobalDeviceType * fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::getGlobalDevice | ( | ) | [inline, virtual] |
this method retrieves the global-device instance
Implements fesa::AbstractDeviceFactory.
Definition at line 119 of file DeviceFactory.h.
References fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::imp_.
fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::imp_ [private] |
reference to device-factory implementation class, respecting the bridge design pattern
Definition at line 75 of file DeviceFactory.h.
Referenced by fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::DeviceFactory(), fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::getDevice(), fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::getDeviceCollection(), and fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::getGlobalDevice().
fesa::DeviceFactory< GlobalDeviceType, DomainStoreType, DevInstType >::instance_ [static, protected] |
unique instance of the derived-class which will be a singleton
Definition at line 68 of file DeviceFactory.h.