RTC Toolkit 5.1.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rtctk::componentFramework::RegisterFactory< BaseIf, Factory > Class Template Referencefinal

A helper class used to perform registration and deregistration of a factory. More...

#include <factoryRegistry.hpp>

Public Member Functions

 RegisterFactory ()
 
 ~RegisterFactory ()
 

Detailed Description

template<class BaseIf, class Factory>
class rtctk::componentFramework::RegisterFactory< BaseIf, Factory >

A helper class used to perform registration and deregistration of a factory.

This class should be instantiated as a global variable, but only once for each template combination. Doing so will register the given factory when the library in which the global was instantiated is loaded, and deregister it when the library is unloaded or the process terminates.

The following is an example of the code that should be placed inside a source file of a module to register a new factory:

namespace {
class MyFactory : public FactoryRegistry<RuntimeRepoIf>::FactoryIf {
public:
...
};
} // namespace
A simple registry of various factory objects.
Definition factoryRegistry.hpp:47
A helper class used to perform registration and deregistration of a factory.
Definition factoryRegistry.hpp:188
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
Template Parameters
BaseIfThe abstract/base interface class of the service for which the factory will create instances.
FactoryThe class of the new factory being registered.

Constructor & Destructor Documentation

◆ RegisterFactory()

◆ ~RegisterFactory()


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