Lunchbox  1.14.0
Multi-threaded C++ toolbox library for all application developers creating high-performance multi-threaded programs.
lunchbox::PluginRegisterer< T > Class Template Reference

Helper class to statically register derived plugin classes. More...

#include <pluginRegisterer.h>

+ Collaboration diagram for lunchbox::PluginRegisterer< T >:

Public Member Functions

 PluginRegisterer ()
 Construct and register the Plugin< T > class. More...
 

Detailed Description

template<typename T>
class lunchbox::PluginRegisterer< T >

Helper class to statically register derived plugin classes.

If MyInitDataType is not given, default value is servus::URI.

The following code can be placed in a plugin's cpp file:

namespace
{
PluginRegisterer< MyPluginInterface > registerer;
}

Also note that it needs the following type definition to be placed in the plugin's interface (or in all its implementations that are to be registered):

class MyPluginInterface
{
public:
typedef MyPluginInterface InterfaceT;
typedef MyPluginInitData InitDataT;
( optional for InitDataT == servus::URI )
}
Version
1.11.0

Definition at line 61 of file pluginRegisterer.h.

Constructor & Destructor Documentation

template<typename T>
lunchbox::PluginRegisterer< T >::PluginRegisterer ( )
inline

Construct and register the Plugin< T > class.

Version
1.11.0

Definition at line 65 of file pluginRegisterer.h.

References lunchbox::PluginFactory< T >::getInstance(), and lunchbox::PluginFactory< T >::register_().

+ Here is the call graph for this function:


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