19 #ifndef IGNITION_COMMON_DETAIL_PLUGIN_HH_ 20 #define IGNITION_COMMON_DETAIL_PLUGIN_HH_ 31 template <
class Interface>
34 return static_cast<Interface*
>(
35 this->PrivateGetInterface(Interface::IGNCOMMONInterfaceName));
39 template <
class Interface>
42 return static_cast<const Interface*
>(
43 this->PrivateGetInterface(Interface::IGNCOMMONInterfaceName));
47 template <
class Interface>
50 return static_cast<Interface*
>(
51 this->PrivateGetInterface(_interfaceName));
55 template <
class Interface>
59 return static_cast<const Interface*
>(
60 this->PrivateGetInterface(_interfaceName));
64 template <
class Interface>
67 return this->QueryInterfaceSharedPtr<Interface>(
68 Interface::IGNCOMMONInterfaceName);
72 template <
class Interface>
75 return this->QueryInterfaceSharedPtr<Interface>(
76 Interface::IGNCOMMONInterfaceName);
80 template <
class Interface>
84 Interface *ptr = this->QueryInterface<Interface>(_interfaceName);
92 template <
class Interface>
96 const Interface *ptr = this->QueryInterface<Interface>(_interfaceName);
104 template <
class Interface>
107 return this->
HasInterface(Interface::IGNCOMMONInterfaceName);
bool HasInterface() const
Returns true if this Plugin has the specified type of interface. Note that this function only works w...
Definition: detail/Plugin.hh:105
Interface * QueryInterface()
Get an interface of the specified type. Note that this function only works when the Interface type is...
Definition: detail/Plugin.hh:32
Forward declarations for the common classes.
std::shared_ptr< Interface > QueryInterfaceSharedPtr()
Get the requested interface as a std::shared_ptr. Note that this function only works when the Interfa...
Definition: detail/Plugin.hh:65