31 #include <boost/dll/import.hpp>
33 #include <boost/filesystem.hpp>
34 #include <boost/filesystem/fstream.hpp>
41 namespace SourceXtractor {
54 static_plugin->registerPlugin(*
this);
61 auto load_mode = boost::dll::load_mode::append_decorations | boost::dll::load_mode::search_system_folders;
63 boost::dll::shared_library lib;
69 lib.load(full_path, load_mode);
70 }
catch (
const boost::system::system_error&) {
75 if (!lib.is_loaded()) {
76 lib.load(plugin_name, load_mode);
79 auto creator = lib.get_alias<pluginapi_create_t>(
"create_plugin");
80 auto plugin = creator();
81 auto id_string = plugin->getIdString();
82 logger.
info() <<
"Registering plugin " << id_string;
83 plugin->registerPlugin(*
this);
84 s_loaded_plugins.push_back(lib);
void info(const std::string &logMessage)
static Logging getLogger(const std::string &name="")