21 #ifndef PLUGINLIBLOADER_H 22 #define PLUGINLIBLOADER_H 27 #include <tulip/tulipconf.h> 43 class TLP_SCOPE PluginLibraryLoader {
71 static void loadPlugins(PluginLoader *loader =
nullptr,
const std::string &pluginPath =
"");
90 static void loadPluginsFromDir(
const std::string &rootPath, PluginLoader *loader =
nullptr,
91 const std::string &userLocalPath =
"");
101 static bool loadPluginLibrary(
const std::string &filename, PluginLoader *loader =
nullptr);
110 static const std::string &getCurrentPluginFileName() {
111 return getInstance()->currentPluginLibrary;
115 PluginLibraryLoader() {}
117 bool initPluginDir(PluginLoader *loader,
bool recursive =
false,
118 const std::string &userPluginsPath =
"");
121 static PluginLibraryLoader *getInstance() {
122 if (_instance ==
nullptr) {
123 _instance =
new PluginLibraryLoader();
128 static PluginLibraryLoader *_instance;
131 std::string pluginPath;
132 std::string currentPluginLibrary;
136 #endif // PLUGINLIBLOADER_H