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

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

#include <pluginRegisterer.h>

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

Static Public Member Functions

template<typename U >
static char(& test (typename U::InitDataT const *))[1]
 
template<typename U >
static char(& test (...))[2]
 

Static Public Attributes

static const bool value = (sizeof(test<T>(0)) == 1)
 

Detailed Description

template<typename T>
struct lunchbox::hasInitDataT< 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 PluginT;
typedef MyPluginInitData InitDataT;
( optional for InitDataT == servus::URI )
}
Version
1.11.0

Definition at line 64 of file pluginRegisterer.h.


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