22 #ifndef LUNCHBOX_PLUGINFACTORY_H 23 #define LUNCHBOX_PLUGINFACTORY_H 26 #include <lunchbox/algorithm.h> 27 #include <lunchbox/debug.h> 28 #include <lunchbox/dso.h> 29 #include <lunchbox/file.h> 30 #include <servus/uri.h> 32 #include <unordered_map> 59 typedef std::vector< PluginT > Plugins;
72 T*
create(
const typename T::InitDataT& initData );
101 void load(
const int version,
const std::string& path,
102 const std::string& pattern );
103 void load(
const int version,
const Strings& paths,
104 const std::string& pattern );
114 #pragma warning( disable: 4251 ) 116 typedef std::unordered_map< DSO*, PluginT > PluginMap;
117 PluginMap _libraries;
118 #pragma warning( default: 4251 ) 125 #include "pluginFactory.ipp" 127 #endif // LUNCHBOX_PLUGINFACTORY_H Basic type definitions not provided by the operating system.
void deregisterAll()
Unregister all plugin types.
std::vector< std::string > Strings
A vector of std::strings.
Factory for Plugin classes.
T * create(const typename T::InitDataT &initData)
Create a plugin instance.
void register_(const PluginT &plugin)
Register a plugin type.
void load(const int version, const std::string &path, const std::string &pattern)
Load all compatible plugin libraries from a directory matching a pattern.
Abstraction layer and common utilities for multi-threaded programming.
Manages a class deriving from a T interface.
static PluginFactory & getInstance()
Get the single class instance.
bool deregister(const PluginT &plugin)
Deregister a plugin type.