The Factory class defines a plugin factory that can be used by the Loader class to produce products that implement an interface. More...
|using||ProductPtrType = ProductPtr< Interface >|
Public Member Functions
|ProductPtrType||Construct (Args &&... _args)|
|This function is called by Loader to construct the class that implements the InterfacePtr interface. More...|
|Public Member Functions inherited from EnablePluginFromThis|
|Default constructor. More...|
|Get a copy of the PluginPtr that manages this object. More...|
|ConstPluginPtr||PluginFromThis () const|
|Get a const-qualified copy of the PluginPtr that manages this object. More...|
Additional Inherited Members
|Protected Member Functions inherited from EnablePluginFromThis|
|std::shared_ptr< void >||PluginInstancePtrFromThis () const|
|This is an abstract shared_ptr to the Plugin instance. This shared_ptr will maintain a reference count on the shared library that provides the plugin so that the shared library does not get unloaded while this shared_ptr is still alive. More...|
template<typename Interface, typename... Args>
class ignition::plugin::Factory< Interface, Args >
The Factory class defines a plugin factory that can be used by the Loader class to produce products that implement an interface.
To define the inputs and outputs of a factory, set the template arguments, for example:
defines a factory that can produce a
std::unique_ptr<InterfaceClass> given arguments of
To register a factory, use the
IGNITION_ADD_FACTORY macro, e.g.:
ImplementedClass is the name of the class that your plugin library has used to implement
Member Typedef Documentation
|using ProductPtrType = ProductPtr<Interface>|
Member Function Documentation
|ProductPtrType Construct||(||Args &&...||_args||)|
This function is called by Loader to construct the class that implements the InterfacePtr interface.
[in] _args The arguments as defined by the template parameters.
- an RAII-managed reference to the interface type as defined by the template parameters.
The documentation for this class was generated from the following file: