Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Public Types | Public Member Functions | Private Types | Private Attributes
mrpt::utils::CListOfClasses Class Reference

Detailed Description

A list (actually based on a std::set) of MRPT classes, capable of keeping any class registered by the mechanism of CSerializable classes.

Definition at line 24 of file CListOfClasses.h.

#include <mrpt/utils/CListOfClasses.h>

Public Types

typedef TSet::iterator iterator
 
typedef TSet::const_iterator const_iterator
 

Public Member Functions

iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
void insert (const mrpt::utils::TRuntimeClassId *id)
 Insert a class in the list. More...
 
bool contains (const mrpt::utils::TRuntimeClassId *id) const
 Does the list contains this class? More...
 
bool containsDerivedFrom (const mrpt::utils::TRuntimeClassId *id) const
 Does the list contains a class derived from...? More...
 
void clear ()
 Empty the list. More...
 
bool empty () const
 Is the list empty? More...
 
std::string toString () const
 Return a string representation of the list, for example: "CPose2D, CObservation, CPose3D". More...
 
void fromString (const std::string &s)
 Return a string representation of the list, for example: "CPose2D, CObservation, CPose3D". More...
 

Private Types

typedef std::set< const mrpt::utils::TRuntimeClassId * > TSet
 

Private Attributes

TSet m_data
 

Member Typedef Documentation

◆ const_iterator

typedef TSet::const_iterator mrpt::utils::CListOfClasses::const_iterator

Definition at line 33 of file CListOfClasses.h.

◆ iterator

typedef TSet::iterator mrpt::utils::CListOfClasses::iterator

Definition at line 32 of file CListOfClasses.h.

◆ TSet

Definition at line 27 of file CListOfClasses.h.

Member Function Documentation

◆ begin() [1/2]

iterator mrpt::utils::CListOfClasses::begin ( )
inline

Definition at line 35 of file CListOfClasses.h.

References m_data.

Referenced by containsDerivedFrom(), mrpt::slam::CMetricMapBuilderRBPF::processActionObservation(), and toString().

Here is the caller graph for this function:

◆ begin() [2/2]

const_iterator mrpt::utils::CListOfClasses::begin ( ) const
inline

Definition at line 36 of file CListOfClasses.h.

References m_data.

◆ clear()

void mrpt::utils::CListOfClasses::clear ( )
inline

Empty the list.

Definition at line 59 of file CListOfClasses.h.

References m_data.

Referenced by fromString().

Here is the caller graph for this function:

◆ contains()

bool mrpt::utils::CListOfClasses::contains ( const mrpt::utils::TRuntimeClassId id) const
inline

Does the list contains this class?

Definition at line 50 of file CListOfClasses.h.

References m_data.

Referenced by mrpt::slam::CMetricMapBuilderICP::processObservation().

Here is the caller graph for this function:

◆ containsDerivedFrom()

bool CListOfClasses::containsDerivedFrom ( const mrpt::utils::TRuntimeClassId id) const

Does the list contains a class derived from...?

Definition at line 16 of file CListOfClasses.cpp.

References begin(), and end().

Here is the call graph for this function:

◆ empty()

bool mrpt::utils::CListOfClasses::empty ( ) const
inline

Is the list empty?

Definition at line 61 of file CListOfClasses.h.

References m_data.

◆ end() [1/2]

iterator mrpt::utils::CListOfClasses::end ( )
inline

Definition at line 37 of file CListOfClasses.h.

References m_data.

Referenced by containsDerivedFrom(), mrpt::slam::CMetricMapBuilderRBPF::processActionObservation(), and toString().

Here is the caller graph for this function:

◆ end() [2/2]

const_iterator mrpt::utils::CListOfClasses::end ( ) const
inline

Definition at line 38 of file CListOfClasses.h.

References m_data.

◆ fromString()

void CListOfClasses::fromString ( const std::string s)

Return a string representation of the list, for example: "CPose2D, CObservation, CPose3D".

Exceptions
std::exceptionOn unregistered class name found.

Definition at line 35 of file CListOfClasses.cpp.

References ASSERTMSG_, clear(), mrpt::utils::findRegisteredClass(), mrpt::format(), insert(), lstClasses, MRPT_TRY_END, MRPT_TRY_START, and mrpt::system::tokenize().

Here is the call graph for this function:

◆ insert()

void mrpt::utils::CListOfClasses::insert ( const mrpt::utils::TRuntimeClassId id)
inline

Insert a class in the list.

Example of usage:

myList.insert(CLASS_ID(CObservationImage));

Definition at line 44 of file CListOfClasses.h.

References m_data.

Referenced by fromString().

Here is the caller graph for this function:

◆ toString()

std::string CListOfClasses::toString ( ) const

Return a string representation of the list, for example: "CPose2D, CObservation, CPose3D".

Definition at line 24 of file CListOfClasses.cpp.

References begin(), and end().

Here is the call graph for this function:

Member Data Documentation

◆ m_data

TSet mrpt::utils::CListOfClasses::m_data
private

Definition at line 29 of file CListOfClasses.h.

Referenced by begin(), clear(), contains(), empty(), end(), and insert().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019