|
Robowflex
v0.1
Making MoveIt Easy
|
A singleton class for dynamic loading classes through pluginlib. More...
#include <plugin.h>
Public Member Functions | |
| PluginManager (PluginManager const &)=delete | |
| void | operator= (PluginManager const &)=delete |
| template<typename T > | |
| std::shared_ptr< T > | loadPlugin (const std::string &package, const std::string &plugin) |
| Load a plugin named plugin of type T. More... | |
Static Public Member Functions | |
| static PluginManager & | getInstance () |
| Get the singleton instance of PluginManager. More... | |
| template<typename T > | |
| static std::shared_ptr< T > | load (const std::string &package, const std::string &plugin) |
| Load a plugin named plugin of type T using the singleton instance. More... | |
Private Types | |
| template<typename T > | |
| using | Loader = pluginlib::ClassLoader< T > |
| A typed class loader. More... | |
| template<typename T > | |
| using | LoaderPtr = std::shared_ptr< Loader< T > > |
| A shared pointer to a typed class loader. More... | |
| using | BaseLoader = pluginlib::ClassLoaderBase |
| The base class of the class loader. More... | |
| using | BaseLoaderPtr = std::shared_ptr< BaseLoader > |
| A shared pointer to the base class of the class loader. More... | |
Private Member Functions | |
| PluginManager () | |
| Constructor. More... | |
| template<typename T > | |
| LoaderPtr< T > | getLoader (const std::string &package) |
| Gets the plugin loader for a plugin type T. Grabs the loader from cached loaders if available, otherwise creates the plugin loader and caches it. More... | |
Private Attributes | |
| std::mutex | mutex_ |
| Class loading mutex. More... | |
| std::map< std::pair< std::string, std::string >, BaseLoaderPtr > | loaders_ |
| Cached loaders. More... | |
A singleton class for dynamic loading classes through pluginlib.
|
private |
|
private |
|
private |
|
private |
|
delete |
|
inlineprivate |
|
inlinestatic |
Get the singleton instance of PluginManager.
Definition at line 33 of file plugin.h.
|
inlineprivate |
Gets the plugin loader for a plugin type T. Grabs the loader from cached loaders if available, otherwise creates the plugin loader and caches it.
| [in] | package | ROS package that exports class T. |
| T | The type of plugin loader to get. |
Definition at line 115 of file plugin.h.
|
inlinestatic |
Load a plugin named plugin of type T using the singleton instance.
| [in] | package | ROS package that exports plugin's base class T. |
| [in] | plugin | Name of the plugin to load. |
| T | The type of the plugin to load. |
Definition at line 46 of file plugin.h.
|
inline |
Load a plugin named plugin of type T.
| [in] | package | ROS package that exports plugin's base class T. |
| [in] | plugin | Name of the plugin to load. |
| T | The type of the plugin to load. |
Definition at line 58 of file plugin.h.
|
delete |
|
private |
|
private |