AWViz-ROS C++ API Reference
Loading...
Searching...
No Matches
Public Member Functions | List of all members
awviz_common::PluginFactory< T > Class Template Reference

Abstract base class representing a plugin load-able class factory. More...

#include <plugin_factory.hpp>

Public Member Functions

 PluginFactory (const std::string &package, const std::string &base_class_type)
 Construct factory loading pluginlib::ClassLoader<T>.
 
std::string get_plugin_manifest_path (const std::string &lookup_name) const
 Return plugin manifest path.
 
PluginInfo get_plugin_info (const std::string &lookup_name) const
 Return plugin information.
 
virtual std::shared_ptr< T > create_instance (const std::string &lookup_name) const
 Create a instance of the plugin.
 
std::vector< std::string > get_declared_classes () const
 Return a list of all available classes for this ClassLoader's base class type.
 

Detailed Description

template<typename T>
class awviz_common::PluginFactory< T >

Abstract base class representing a plugin load-able class factory.

Constructor & Destructor Documentation

◆ PluginFactory()

template<typename T >
awviz_common::PluginFactory< T >::PluginFactory ( const std::string &  package,
const std::string &  base_class_type 
)
inline

Construct factory loading pluginlib::ClassLoader<T>.

Parameters
packageName of package.
base_class_typeA string with the fully qualified base class type for the plugin, i.e. NAMESPACE::PLUGIN.

Member Function Documentation

◆ create_instance()

template<typename T >
virtual std::shared_ptr< T > awviz_common::PluginFactory< T >::create_instance ( const std::string &  lookup_name) const
inlinevirtual

Create a instance of the plugin.

Parameters
lookup_nameLookup name of the class.
Returns
Shared pointer of a plugin. Returns nullptr if pluginlib::PluginlibException occurred.

◆ get_declared_classes()

template<typename T >
std::vector< std::string > awviz_common::PluginFactory< T >::get_declared_classes ( ) const
inline

Return a list of all available classes for this ClassLoader's base class type.

Returns
std::vector<std::string>

◆ get_plugin_info()

template<typename T >
PluginInfo awviz_common::PluginFactory< T >::get_plugin_info ( const std::string &  lookup_name) const
inline

Return plugin information.

Parameters
lookup_nameLookup name of the class.
Returns
PluginInfo object.

◆ get_plugin_manifest_path()

template<typename T >
std::string awviz_common::PluginFactory< T >::get_plugin_manifest_path ( const std::string &  lookup_name) const
inline

Return plugin manifest path.

Parameters
lookup_nameLookup name of the class.
Returns
The path of the associated plugin manifest.

The documentation for this class was generated from the following file: