ifw-fcf  5.0.0-pre2
Public Member Functions | List of all members
fcf::devmgr::common::DeviceMaker< T > Class Template Reference

#include <deviceMaker.hpp>

Inheritance diagram for fcf::devmgr::common::DeviceMaker< T >:
fcf::devmgr::common::IDeviceMaker

Public Member Functions

 DeviceMaker (const std::string &key)
 DeviceMaker constructor. More...
 
virtual std::shared_ptr< IDeviceCreate (const std::string &filename, const std::string &name, DataContext &data_ctx) const
 Create an instance of a device. More...
 
- Public Member Functions inherited from fcf::devmgr::common::IDeviceMaker
virtual ~IDeviceMaker ()
 Default destructor. More...
 

Constructor & Destructor Documentation

◆ DeviceMaker()

template<typename T >
fcf::devmgr::common::DeviceMaker< T >::DeviceMaker ( const std::string &  key)
inlineexplicit

DeviceMaker constructor.

Parameters
[in]keykeyword to indentify a device in the factory

When created, the Device maker will automaticly register itself with the factory.

Note
you are discouraged from using DeviceMaker outside REGISTER_DEVICE macro

Member Function Documentation

◆ Create()

template<typename T >
virtual std::shared_ptr<IDevice> fcf::devmgr::common::DeviceMaker< T >::Create ( const std::string &  filename,
const std::string &  name,
DataContext data_ctx 
) const
inlinevirtual

Create an instance of a device.

Parameters
[in]filenamefilename containing the device configuration
[in]namedevice id
[in,out]data_ctxreference to the device context object
Returns
shared pointer to the object instance created.

Implements fcf::devmgr::common::IDeviceMaker.


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