6 #ifndef KNOWROB_PLUGIN_LIBRARY_H_
7 #define KNOWROB_PLUGIN_LIBRARY_H_
12 #include "knowrob/plugins/PluginFactory.h"
13 #include "knowrob/Logger.h"
20 class PluginLibrary :
public PluginFactory<T> {
61 KB_ERROR(
"dlopen failed: {}", dlerror());
64 create_ = (std::shared_ptr<T> (*)()) dlsym(
handle_,
"knowrob_createPlugin");
73 std::shared_ptr<NamedPlugin<T>>
create(std::string_view pluginID)
override {
78 std::string_view
name()
const override {
return name_; };
87 std::shared_ptr<T> (*
create_)();
std::shared_ptr< NamedPlugin< T > > create(std::string_view pluginID) override
const std::string dllPath_
~PluginLibrary() override
std::string_view name() const override
PluginLibrary(const PluginLibrary &)=delete
PluginLibrary(std::string_view dllPath)
std::shared_ptr< T >(* create_)()