OpenRTM-aist 2.0.2
Loading...
Searching...
No Matches
RTC::FactoryCXX Class Reference

FactoryCXX class. More...

#include <Factory.h>

Inheritance diagram for RTC::FactoryCXX:
Collaboration diagram for RTC::FactoryCXX:

Public Member Functions

 FactoryCXX (const coil::Properties &profile, RtcNewFunc new_func, RtcDeleteFunc delete_func, RTM::NumberingPolicyBase *policy=new RTM::ProcessUniquePolicy())
 Constructor.
 
 ~FactoryCXX () override
 
RTObject_implcreate (Manager *mgr) override
 Create RT-Components.
 
void destroy (RTObject_impl *comp) override
 Destroy RT-Components.
 
- Public Member Functions inherited from RTC::FactoryBase
 FactoryBase (const coil::Properties &profile)
 Constructor.
 
virtual ~FactoryBase ()
 Destructor.
 
virtual coil::Properties & profile ()
 Get the component profile.
 
virtual int number ()
 Get the number of current instances.
 

Protected Attributes

RtcNewFunc m_New
 The pointer to component object create function .
 
RtcDeleteFunc m_Delete
 The pointer to component object destroy function .
 
RTM::NumberingPolicyBasem_policy
 The naming policy on creating the components .
 
- Protected Attributes inherited from RTC::FactoryBase
coil::Properties m_Profile
 Component profile .
 
int m_Number
 Number of current RT-Component's instances. .
 

Detailed Description

FactoryCXX class.

RT-Component factory class for C++.

Since
0.2.0

Constructor & Destructor Documentation

◆ FactoryCXX()

RTC::FactoryCXX::FactoryCXX ( const coil::Properties & profile,
RtcNewFunc new_func,
RtcDeleteFunc delete_func,
RTM::NumberingPolicyBase * policy = new RTM::ProcessUniquePolicy() )

Constructor.

Constructor. Create component factory class with three arguments: component profile, function pointer to object create function and object destroy function.

Parameters
profileComponent profile
new_funcPointer to component create function
delete_funcPointer to component destroy function
policyThe naming policy at component creation (The default value:DefaultNumberingPolicy)

◆ ~FactoryCXX()

RTC::FactoryCXX::~FactoryCXX ( )
inlineoverride

References m_policy.

Member Function Documentation

◆ create()

RTObject_impl * RTC::FactoryCXX::create ( Manager * mgr)
overridevirtual

Create RT-Components.

Create RT-Component's instances

Parameters
mgrManager object
Returns
Created RT-Components

Implements RTC::FactoryBase.

◆ destroy()

void RTC::FactoryCXX::destroy ( RTObject_impl * comp)
overridevirtual

Destroy RT-Components.

Destroy RT-Component's instances

Parameters
compThe target RT-Component for destruction

Implements RTC::FactoryBase.

Member Data Documentation

◆ m_Delete

RtcDeleteFunc RTC::FactoryCXX::m_Delete
protected

The pointer to component object destroy function .

◆ m_New

RtcNewFunc RTC::FactoryCXX::m_New
protected

The pointer to component object create function .

◆ m_policy

RTM::NumberingPolicyBase* RTC::FactoryCXX::m_policy
protected

The naming policy on creating the components .

Referenced by ~FactoryCXX().


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