AWViz-ROS
Loading...
Searching...
No Matches
awviz_common::DisplayFactory Class Reference

Factory class for Display. More...

#include <display_factory.hpp>

Inheritance diagram for awviz_common::DisplayFactory:
awviz_common::PluginFactory< Display >

Public Member Functions

 DisplayFactory ()
 
 ~DisplayFactory ()=default
 
const std::set< std::string > & get_message_types (const std::string &lookup_name)
 Get the set of declared message types.
 
std::optional< std::string > get_class_lookup_name (const std::string &msg_type) const
 Get the Class Id of the corresponding message type.
 
- Public Member Functions inherited from awviz_common::PluginFactory< Display >
 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< Displaycreate_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.
 

Static Public Attributes

static constexpr const char * LIBRARY_TAG = "library"
 XML tag of library.
 
static constexpr const char * CLASS_TAG = "class"
 XML tag of class.
 
static constexpr const char * MESSAGE_TYPE_TAG = "message_type"
 XML tag of message type.
 
static constexpr const char * TYPE_ATTRIBUTE = "type"
 XML attribute of type.
 
static constexpr const char * NAME_ATTRIBUTE = "name"
 XML attribute of name.
 

Detailed Description

Factory class for Display.

Constructor & Destructor Documentation

◆ DisplayFactory()

awviz_common::DisplayFactory::DisplayFactory ( )

◆ ~DisplayFactory()

awviz_common::DisplayFactory::~DisplayFactory ( )
default

Member Function Documentation

◆ get_class_lookup_name()

std::optional< std::string > awviz_common::DisplayFactory::get_class_lookup_name ( const std::string &  msg_type) const

Get the Class Id of the corresponding message type.

Parameters
msg_typeROS message type.
Returns
Return a string of lookup name if the specified type has been declared, otherwise returns nullptr.

◆ get_message_types()

const std::set< std::string > & awviz_common::DisplayFactory::get_message_types ( const std::string &  lookup_name)

Get the set of declared message types.

Parameters
lookup_nameLookup name of the class.
Returns
Set of declared message types.

Member Data Documentation

◆ CLASS_TAG

constexpr const char* awviz_common::DisplayFactory::CLASS_TAG = "class"
staticconstexpr

XML tag of class.

◆ LIBRARY_TAG

constexpr const char* awviz_common::DisplayFactory::LIBRARY_TAG = "library"
staticconstexpr

XML tag of library.

◆ MESSAGE_TYPE_TAG

constexpr const char* awviz_common::DisplayFactory::MESSAGE_TYPE_TAG = "message_type"
staticconstexpr

XML tag of message type.

◆ NAME_ATTRIBUTE

constexpr const char* awviz_common::DisplayFactory::NAME_ATTRIBUTE = "name"
staticconstexpr

XML attribute of name.

◆ TYPE_ATTRIBUTE

constexpr const char* awviz_common::DisplayFactory::TYPE_ATTRIBUTE = "type"
staticconstexpr

XML attribute of type.


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