19 #ifndef IGNITION_PLUGIN_PLUGIN_HH_
20 #define IGNITION_PLUGIN_PLUGIN_HH_
26 #include <ignition/utilities/SuppressWarning.hh>
28 #include <ignition/plugin/Export.hh>
37 template <
class,
class>
class ComposePlugin;
38 template <
class>
class SelectSpecializers;
40 class EnablePluginFromThis;
62 public:
template <
class Interface>
66 public:
template <
class Interface>
71 public:
template <
class Interface>
73 Interface *QueryInterface(const
std::
string &);
77 public: template <class Interface>
79 const Interface *QueryInterface(
80 const
std::
string &) const;
101 public: template <class Interface>
102 std::shared_ptr<Interface> QueryInterfaceSharedPtr();
106 public: template <class Interface>
107 std::shared_ptr<const Interface> QueryInterfaceSharedPtr() const;
111 public: template <class Interface>
113 std::shared_ptr<Interface> QueryInterfaceSharedPtr(
114 const
std::
string &);
118 public: template <class Interface>
120 std::shared_ptr<const Interface> QueryInterfaceSharedPtr(
121 const
std::
string &) const;
126 public: template <class Interface>
127 bool HasInterface() const;
142 public:
bool HasInterface(const
std::
string &_interfaceName,
143 const
bool _demangled = true) const;
148 public: const
std::
string *Name() const;
154 template <class, class> friend class detail::ComposePlugin;
155 template <class> friend class detail::SelectSpecializers;
165 private:
void *PrivateQueryInterface(
166 const
std::
string &_interfaceName) const;
169 private:
void PrivateCopyPluginInstance(const
Plugin &_other) const;
176 private:
void PrivateCopyPluginInstance(
178 const
std::shared_ptr<
void> &_instancePtr) const;
185 private:
void PrivateCreatePluginInstance(
187 const
std::shared_ptr<
void> &_dlHandlePtr) const;
191 private: const
std::shared_ptr<
void> &PrivateGetInstancePtr() const;
205 private:
InterfaceMap::iterator PrivateGetOrCreateIterator(
206 const
std::
string &_interfaceName);
208 class Implementation;
209 IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
211 private: const
std::unique_ptr<Implementation> dataPtr;
212 IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
220 #include "ignition/plugin/detail/Plugin.hh"
EnablePluginFromThis is an optional base class which can be inherited by Plugin classes....
Definition: EnablePluginFromThis.hh:41
Interface * QueryInterface()
Get an interface of the specified type, if it is provided by this plugin.
const Interface * QueryInterface() const
const-qualified version of QueryInterface<Interface>()
Definition: SpecializedPlugin.hh:37
This class manages the lifecycle of a plugin instance. It can receive a plugin instance from the Load...
Definition: PluginPtr.hh:53
WeakPluginPtr is a non-reference-holding smart pointer for a Plugin. WeakPluginPtr is analogous to st...
Definition: WeakPluginPtr.hh:40
Definition: EnablePluginFromThis.hh:26