22 #ifndef LUNCHBOX_PLUGINREGISTERER_H
23 #define LUNCHBOX_PLUGINREGISTERER_H
25 #include <lunchbox/plugin.h>
26 #include <lunchbox/pluginFactory.h>
28 #include <boost/bind.hpp>
29 #include <boost/version.hpp>
30 #if BOOST_VERSION >= 104300
31 # include <boost/functional/factory.hpp>
33 # include <lunchbox/factory.hpp>
72 template<
typename U>
static char (&test(
typename U::InitDataT
const*))[1];
73 template<
typename U>
static char (&test(...))[2];
75 static const bool value = (
sizeof(test<T>(0)) == 1);
78 template< typename Impl, bool hasInitData = hasInitDataT< Impl >::value >
97 boost::bind( boost::factory< Impl* >(), _1 ),
98 boost::bind( &Impl::handles, _1 ));
100 typename Impl::InitDataT >::getInstance().
116 boost::bind( boost::factory< Impl* >(), _1 ),
117 boost::bind( &Impl::handles, _1 ));
PluginRegisterer()
Construct a registerer and register the Impl class.
Factory for Plugin classes.
Helper class to statically register derived plugin classes.
Abstraction layer and common utilities for multi-threaded programming.
Manages a class deriving from a PluginT interface.
static PluginFactory & getInstance()
Get the single class instance.
PluginRegisterer()
Construct a registerer and register the Impl class.
PluginRegisterer()
Construct a registerer and register the Impl class.