MRPT  1.9.9
List of all members | Public Types | Public Member Functions | Public Attributes
mrpt::rtti::TRuntimeClassId Struct Reference

Detailed Description

A structure that holds runtime class type information.

Use CLASS_ID(<class_name>) to get a reference to the class_name's TRuntimeClassId descriptor.

Definition at line 31 of file CObject.h.

#include <mrpt/rtti/CObject.h>

Public Types

using Ptr = safe_ptr< TRuntimeClassId >
 

Public Member Functions

std::shared_ptr< CObjectcreateObject () const
 
bool derivedFrom (const TRuntimeClassId *pBaseClass) const
 
bool derivedFrom (const char *pBaseClass_name) const
 

Public Attributes

const char * className
 
std::function< std::shared_ptr< CObject >void)> ptrCreateObject
 Create an object of the related class, or nullptr if it is virtual. More...
 
const TRuntimeClassId *(* getBaseClass )()
 Gets the base class runtime id. More...
 

Member Typedef Documentation

◆ Ptr

Definition at line 33 of file CObject.h.

Member Function Documentation

◆ createObject()

CObject::Ptr TRuntimeClassId::createObject ( ) const

Definition at line 79 of file CObject.cpp.

References className, mrpt::system::os::fprintf(), and ptrCreateObject.

Referenced by mrpt::nav::CParameterizedTrajectoryGenerator::CreatePTG(), mrpt::nav::CMultiObjectiveMotionOptimizerBase::Factory(), mrpt::nav::CAbstractHolonomicReactiveMethod::Factory(), mrpt::serialization::CArchive::ReadObject(), and mrpt::serialization::CArchive::ReadVariant().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ derivedFrom() [1/2]

bool TRuntimeClassId::derivedFrom ( const TRuntimeClassId pBaseClass) const

Definition at line 24 of file CObject.cpp.

References ASSERT_, getBaseClass, and mrpt::rtti::registerAllPendingClasses().

Referenced by mrpt::maps::COccupancyGridMap2D::determineMatching2D(), mrpt::maps::CPointsMap::determineMatching3D(), mrpt::slam::CICP::ICP3D_Method_Classic(), and mrpt::slam::CICP::ICP_Method_LM().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ derivedFrom() [2/2]

bool TRuntimeClassId::derivedFrom ( const char *  pBaseClass_name) const

Definition at line 50 of file CObject.cpp.

References ASSERTMSG_, mrpt::rtti::findRegisteredClass(), mrpt::format(), getBaseClass, and mrpt::rtti::registerAllPendingClasses().

Here is the call graph for this function:

Member Data Documentation

◆ className

const char* mrpt::rtti::TRuntimeClassId::className

◆ getBaseClass

const TRuntimeClassId*(* mrpt::rtti::TRuntimeClassId::getBaseClass) ()

Gets the base class runtime id.

Definition at line 38 of file CObject.h.

Referenced by derivedFrom().

◆ ptrCreateObject

std::function<std::shared_ptr<CObject>void)> mrpt::rtti::TRuntimeClassId::ptrCreateObject

Create an object of the related class, or nullptr if it is virtual.

Definition at line 36 of file CObject.h.

Referenced by createObject().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: cb8dd5fc8 Sat Dec 7 21:55:39 2019 +0100 at sáb dic 7 22:00:13 CET 2019