Class CListOfClasses
Defined in File CListOfClasses.h
Inheritance Relationships
Base Type
public mrpt::Stringifyable
Class Documentation
-
class CListOfClasses : public mrpt::Stringifyable
A list (actually based on a std::set) of MRPT classes, capable of keeping any class registered by the mechanism of CObject classes. Access to “data” for the actual content, or use any of the helper methods in this class.
Public Types
-
using TSet = std::set<const mrpt::rtti::TRuntimeClassId*>
Public Functions
-
inline void insert(const mrpt::rtti::TRuntimeClassId *id)
Insert a class in the list. Example of usage:
myList.insert(CLASS_ID(CObservationImage));
-
inline bool contains(const mrpt::rtti::TRuntimeClassId *id) const
Does the list contains this class?
-
bool containsDerivedFrom(const mrpt::rtti::TRuntimeClassId *id) const
Does the list contains a class derived from…?
-
virtual std::string asString() const override
Return a string representation of the list, for example: “CPose2D,
CObservation, CPose3D”.
-
void fromString(const std::string &s)
Builds from a string representation of the list, for example: “CPose2D,
CObservation, CPose3D”.
- Throws:
std::exception – On unregistered class name found.
-
using TSet = std::set<const mrpt::rtti::TRuntimeClassId*>