RTI Connext Micro C++ API Version 4.2.0
Loading...
Searching...
No Matches
RTRegistry Class Reference

<<eXtension>> A run-time component factory. More...

#include <dds_cpp_rt.hxx>

Public Member Functions

bool register_component (const char *name, RT_ComponentFactoryI *intf, RT_ComponentFactoryProperty *property, RT_ComponentFactoryListener *listener)
 Register a factory of RT components
 
bool unregister (const char *name, RT_ComponentFactoryProperty **property, RT_ComponentFactoryListener **listener)
 Remove a component factory from the registry
 

Detailed Description

<<eXtension>> A run-time component factory.

Member Function Documentation

◆ register_component()

bool RTRegistry::register_component ( const char * name,
RT_ComponentFactoryI * intf,
RT_ComponentFactoryProperty * property,
RT_ComponentFactoryListener * listener )

Register a factory of RT components

In order to make a component available, it is necessary to register a factory for the components. The factory is responsible for creating and deleting components.

The name of the factory must be unique. Otherwise, if a factory already exists with the the same name, the registration will fail.

Parameters
name<<in>> Name of the component factory
intf<<in>> Pointer to the implementation of the factory interface
property<<in>> Properties with which to create the factory
listener<<in>> The listener to install with the factory
Returns
RTI_TRUE on success, RTI_FALSE on failure
See also
RTRegistry::unregister

◆ unregister()

bool RTRegistry::unregister ( const char * name,
RT_ComponentFactoryProperty ** property,
RT_ComponentFactoryListener ** listener )

Remove a component factory from the registry

After a component factory is unregistered, it will no longer be possible to create or delete components with the factory.

Parameters
name<<in>> Name of the component factory
property<<in>> Properties with which the factory was created
listener<<in>> The listener installed with the factory
Returns
RTI_TRUE on success, RTI_FALSE on failure
See also
RTRegistry::register_component