22 #ifndef LUNCHBOX_PLUGINFACTORY_H 23 #define LUNCHBOX_PLUGINFACTORY_H 25 #include <lunchbox/algorithm.h> 26 #include <lunchbox/debug.h> 27 #include <lunchbox/dso.h> 28 #include <lunchbox/file.h> 29 #include <lunchbox/plugin.h> 31 #include <servus/uri.h> 33 #include <unordered_map> 60 typedef std::vector<PluginT> Plugins;
66 bool handles(
const typename T::InitDataT& initData);
76 T*
create(
const typename T::InitDataT& initData);
108 void load(
const int version,
const std::string& path,
109 const std::string& pattern);
111 const std::string& pattern);
121 #pragma warning(disable : 4251) 123 typedef std::unordered_map<DSO*, PluginT> PluginMap;
124 PluginMap _libraries;
125 #pragma warning(default : 4251) 131 #include "pluginFactory.ipp" 133 #endif // LUNCHBOX_PLUGINFACTORY_H Basic type definitions not provided by the operating system.
void deregisterAll()
Unregister all plugin types.
Factory for Plugin classes.
std::string getDescriptions() const
T * create(const typename T::InitDataT &initData)
Create a plugin instance.
void register_(const PluginT &plugin)
Register a plugin type.
std::vector< std::string > Strings
A vector of std::strings.
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.
bool handles(const typename T::InitDataT &initData)
static PluginFactory & getInstance()
Get the single class instance.
bool deregister(const PluginT &plugin)
Deregister a plugin type.