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;
99 public: template <class Interface>
100 std::shared_ptr<Interface> QueryInterfaceSharedPtr();
104 public: template <class Interface>
105 std::shared_ptr<const Interface> QueryInterfaceSharedPtr() const;
109 public: template <class Interface>
111 std::shared_ptr<Interface> QueryInterfaceSharedPtr(
112 const
std::
string &);
116 public: template <class Interface>
118 std::shared_ptr<const Interface> QueryInterfaceSharedPtr(
119 const
std::
string &) const;
124 public: template <class Interface>
125 bool HasInterface() const;
140 public:
bool HasInterface(const
std::
string &_interfaceName,
141 const
bool _demangled = true) const;
146 public: const
std::
string *Name() const;
152 template <class, class> friend class detail::ComposePlugin;
153 template <class> friend class detail::SelectSpecializers;
163 private:
void *PrivateQueryInterface(
164 const
std::
string &_interfaceName) const;
167 private:
void PrivateCopyPluginInstance(const
Plugin &_other) const;
174 private:
void PrivateCopyPluginInstance(
176 const
std::shared_ptr<
void> &_instancePtr) const;
183 private:
void PrivateCreatePluginInstance(
185 const
std::shared_ptr<
void> &_dlHandlePtr) const;
189 private: const
std::shared_ptr<
void> &PrivateGetInstancePtr() const;
203 private:
InterfaceMap::iterator PrivateGetOrCreateIterator(
204 const
std::
string &_interfaceName);
206 class Implementation;
207 IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
209 private: const
std::unique_ptr<Implementation> dataPtr;
210 IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
218 #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