Public Member Functions | Protected Member Functions | List of all members
rviz::ClassIdRecordingFactory< Type > Class Template Referenceabstract

Templated factory which informs objects created by it what their class identifier string was. More...

#include <class_id_recording_factory.h>

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

Public Member Functions

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 QString getClassDescription (const QString &class_id) const =0
 
virtual QString getClassName (const QString &class_id) const =0
 
virtual QString getClassPackage (const QString &class_id) const =0
 
virtual QStringList getDeclaredClassIds ()=0
 
virtual QIcon getIcon (const QString &class_id) const =0
 
virtual ~Factory ()
 

Protected Member Functions

virtual Type * makeRaw (const QString &class_id, QString *error_return=nullptr)=0
 

Detailed Description

template<class Type>
class rviz::ClassIdRecordingFactory< Type >

Templated factory which informs objects created by it what their class identifier string was.

Calls a setClassId() function on any instance created by a protected makeRaw() function (pure virtual in this class).

Definition at line 41 of file class_id_recording_factory.h.

Member Function Documentation

◆ make()

template<class Type>
virtual Type* rviz::ClassIdRecordingFactory< Type >::make ( const QString &  class_id,
QString *  error_return = nullptr 
)
inlinevirtual

Instantiate and return a instance of a subclass of Type using makeRaw().

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 make() returns NULL and error_return is not NULL, *error_return will be set. On success, *error_return will not be changed.

Definition at line 55 of file class_id_recording_factory.h.

◆ makeRaw()

template<class Type>
virtual Type* rviz::ClassIdRecordingFactory< Type >::makeRaw ( const QString &  class_id,
QString *  error_return = nullptr 
)
protectedpure virtual

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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Sat Aug 6 2022 02:06:52