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 #include <boost/functional/factory.hpp>
68 template<
typename U>
static char (&test(
typename U::InitDataT
const*))[1];
69 template<
typename U>
static char (&test(...))[2];
71 static const bool value = (
sizeof(test<T>(0)) == 1);
74 template< typename Impl, bool hasInitData = hasInitDataT< Impl >::value >
93 boost::bind( boost::factory< Impl* >(), _1 ),
94 boost::bind( &Impl::handles, _1 ));
96 typename Impl::InitDataT >::getInstance().
112 boost::bind( boost::factory< Impl* >(), _1 ),
113 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.