Classes | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
rviz::PluginlibFactory< Type > Class Template Reference

#include <pluginlib_factory.h>

Inheritance diagram for rviz::PluginlibFactory< Type >:
Inheritance graph
[legend]

Classes

struct  BuiltInClassRecord
 

Public Member Functions

virtual void addBuiltInClass (const QString &package, const QString &name, const QString &description, Type *(*factory_function)())
 
QString getClassDescription (const QString &class_id) const override
 
QString getClassName (const QString &class_id) const override
 
QString getClassPackage (const QString &class_id) const override
 
QStringList getDeclaredClassIds () override
 
QIcon getIcon (const QString &class_id) const override
 
virtual QString getPluginManifestPath (const QString &class_id) const
 
 PluginlibFactory (const QString &package, const QString &base_class_type)
 
 ~PluginlibFactory () override
 
- Public Member Functions inherited from rviz::ClassIdRecordingFactory< Type >
virtual Type * make (const QString &class_id, QString *error_return=nullptr)
 Instantiate and return a instance of a subclass of Type using makeRaw(). More...
 
- Public Member Functions inherited from rviz::Factory
virtual ~Factory ()
 

Protected Member Functions

Type * makeRaw (const QString &class_id, QString *error_return=nullptr) override
 Instantiate and return a instance of a subclass of Type using our pluginlib::ClassLoader. More...
 

Private Attributes

QHash< QString, BuiltInClassRecordbuilt_ins_
 
pluginlib::ClassLoader< Type > * class_loader_
 

Detailed Description

template<class Type>
class rviz::PluginlibFactory< Type >

Definition at line 51 of file pluginlib_factory.h.

Constructor & Destructor Documentation

◆ PluginlibFactory()

template<class Type>
rviz::PluginlibFactory< Type >::PluginlibFactory ( const QString &  package,
const QString &  base_class_type 
)
inline

Definition at line 64 of file pluginlib_factory.h.

◆ ~PluginlibFactory()

template<class Type>
rviz::PluginlibFactory< Type >::~PluginlibFactory ( )
inlineoverride

Definition at line 69 of file pluginlib_factory.h.

Member Function Documentation

◆ addBuiltInClass()

template<class Type>
virtual void rviz::PluginlibFactory< Type >::addBuiltInClass ( const QString &  package,
const QString &  name,
const QString &  description,
Type *(*)()  factory_function 
)
inlinevirtual

Definition at line 146 of file pluginlib_factory.h.

◆ getClassDescription()

template<class Type>
QString rviz::PluginlibFactory< Type >::getClassDescription ( const QString &  class_id) const
inlineoverridevirtual

Implements rviz::Factory.

Definition at line 90 of file pluginlib_factory.h.

◆ getClassName()

template<class Type>
QString rviz::PluginlibFactory< Type >::getClassName ( const QString &  class_id) const
inlineoverridevirtual

Implements rviz::Factory.

Definition at line 100 of file pluginlib_factory.h.

◆ getClassPackage()

template<class Type>
QString rviz::PluginlibFactory< Type >::getClassPackage ( const QString &  class_id) const
inlineoverridevirtual

Implements rviz::Factory.

Definition at line 110 of file pluginlib_factory.h.

◆ getDeclaredClassIds()

template<class Type>
QStringList rviz::PluginlibFactory< Type >::getDeclaredClassIds ( )
inlineoverridevirtual

Implements rviz::Factory.

Definition at line 74 of file pluginlib_factory.h.

◆ getIcon()

template<class Type>
QIcon rviz::PluginlibFactory< Type >::getIcon ( const QString &  class_id) const
inlineoverridevirtual

Implements rviz::Factory.

Definition at line 130 of file pluginlib_factory.h.

◆ getPluginManifestPath()

template<class Type>
virtual QString rviz::PluginlibFactory< Type >::getPluginManifestPath ( const QString &  class_id) const
inlinevirtual

Definition at line 120 of file pluginlib_factory.h.

◆ makeRaw()

template<class Type>
Type* rviz::PluginlibFactory< Type >::makeRaw ( const QString &  class_id,
QString *  error_return = nullptr 
)
inlineoverrideprotectedvirtual

Instantiate and return a instance of a subclass of Type using our pluginlib::ClassLoader.

Parameters
class_idA string identifying the class uniquely among classes of its parent class. rviz::GridDisplay might be rviz/Grid, for example.
error_returnIf non-NULL and there is an error, *error_return is set to a description of the problem.
Returns
A new instance of the class identified by class_id, or NULL if there was an error.

If makeRaw() returns NULL and error_return is not NULL, *error_return will be set. On success, *error_return will not be changed.

Implements rviz::ClassIdRecordingFactory< Type >.

Definition at line 173 of file pluginlib_factory.h.

Member Data Documentation

◆ built_ins_

template<class Type>
QHash<QString, BuiltInClassRecord> rviz::PluginlibFactory< Type >::built_ins_
private

Definition at line 203 of file pluginlib_factory.h.

◆ class_loader_

template<class Type>
pluginlib::ClassLoader<Type>* rviz::PluginlibFactory< Type >::class_loader_
private

Definition at line 202 of file pluginlib_factory.h.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Sat May 27 2023 02:06:26