ifw  0.0.1-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
devmgr::common::DeviceFactory Class Reference

#include <deviceFactory.hpp>

Public Member Functions

void RegisterMaker (const std::string &key, IDeviceMaker *maker)
 Register device maker. More...
 
void DeregisterMaker (const std::string &key, IDeviceMaker *maker)
 Deregister device maker. More...
 
std::shared_ptr< IDeviceCreate (const std::string &filename, const std::string &name, DataContext &data_ctx) const
 Creates a new device. More...
 
void RegisterMaker (const std::string &key, IDeviceMaker *maker)
 Register device maker. More...
 
void DeregisterMaker (const std::string &key, IDeviceMaker *maker)
 Deregister device maker. More...
 
std::shared_ptr< IDeviceCreate (const std::string &filename, const std::string &name, DataContext &data_ctx) const
 Creates a new device. More...
 
void RegisterMaker (const std::string &key, IDeviceMaker *maker)
 Register device maker. More...
 
void DeregisterMaker (const std::string &key, IDeviceMaker *maker)
 Deregister device maker. More...
 
std::shared_ptr< IDeviceCreate (const std::string &filename, const std::string &name, DataContext &data_ctx) const
 Creates a new device. More...
 

Static Public Member Functions

static DeviceFactoryInstance ()
 Get instance of singleton. More...
 
static DeviceFactoryInstance ()
 Get instance of singleton. More...
 
static DeviceFactoryInstance ()
 Get instance of singleton. More...
 

Detailed Description

Abstract-Factory Pattern Implementation

Member Function Documentation

std::shared_ptr< IDevice > devmgr::common::DeviceFactory::Create ( const std::string &  filename,
const std::string &  name,
DataContext data_ctx 
) const

Creates a new device.

Parameters
[in]filenamefilename of device configuration
[in]namedevice id
[in]data_ctxreference to data object context
Returns
shared pointer of device object
std::shared_ptr<IDevice> devmgr::common::DeviceFactory::Create ( const std::string &  filename,
const std::string &  name,
DataContext data_ctx 
) const

Creates a new device.

Parameters
[in]filenamefilename of device configuration
[in]namedevice id
[in]data_ctxreference to data object context
Returns
shared pointer of device object
std::shared_ptr<IDevice> devmgr::common::DeviceFactory::Create ( const std::string &  filename,
const std::string &  name,
DataContext data_ctx 
) const

Creates a new device.

Parameters
[in]filenamefilename of device configuration
[in]namedevice id
[in]data_ctxreference to data object context
Returns
shared pointer of device object
void devmgr::common::DeviceFactory::DeregisterMaker ( const std::string &  key,
IDeviceMaker maker 
)

Deregister device maker.

Parameters
[in]keymaker identifier
[in]makerpointer to maker object

This method removes a device maker with a given key

void devmgr::common::DeviceFactory::DeregisterMaker ( const std::string &  key,
IDeviceMaker maker 
)

Deregister device maker.

Parameters
[in]keymaker identifier
[in]makerpointer to maker object

This method removes a device maker with a given key

void devmgr::common::DeviceFactory::DeregisterMaker ( const std::string &  key,
IDeviceMaker maker 
)

Deregister device maker.

Parameters
[in]keymaker identifier
[in]makerpointer to maker object

This method removes a device maker with a given key

DeviceFactory & devmgr::common::DeviceFactory::Instance ( )
static

Get instance of singleton.

Returns
reference to singleton

Factory is implemented as a Singleton

static DeviceFactory& devmgr::common::DeviceFactory::Instance ( )
static

Get instance of singleton.

Returns
reference to singleton

Factory is implemented as a Singleton

static DeviceFactory& devmgr::common::DeviceFactory::Instance ( )
static

Get instance of singleton.

Returns
reference to singleton

Factory is implemented as a Singleton

void devmgr::common::DeviceFactory::RegisterMaker ( const std::string &  key,
IDeviceMaker maker 
)

Register device maker.

Parameters
[in]keymaker identifier
[in]makerpointer to maker object

This method adds new device maker with given key

void devmgr::common::DeviceFactory::RegisterMaker ( const std::string &  key,
IDeviceMaker maker 
)

Register device maker.

Parameters
[in]keymaker identifier
[in]makerpointer to maker object

This method adds new device maker with given key

void devmgr::common::DeviceFactory::RegisterMaker ( const std::string &  key,
IDeviceMaker maker 
)

Register device maker.

Parameters
[in]keymaker identifier
[in]makerpointer to maker object

This method adds new device maker with given key


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