Lunchbox  1.16.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.

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

namespace
{
PluginRegisterer< MyPlugin > registerer;
}

The plugin needs to conform to the following API:

class MyPluginInterface
{
public:
typedef MyPluginInterface InterfaceT;
typedef MyPluginInitData InitDataT;
};
class MyPlugin : public MyPluginInterface
{
public:
MyPlugin( const InitDataT& data );
static bool handles( const InitDataT& data );
static std::string getDescription();
};
Version
1.11.0

Definition at line 66 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 70 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: