A structure that holds runtime class type information.
Use CLASS_ID(<class_name>) to get a reference to the class_name's TRuntimeClassId descriptor.
#include <mrpt/utils/CObject.h>
Public Types | |
using | Ptr = safe_ptr< TRuntimeClassId > |
Public Member Functions | |
mrpt::utils::CObject * | createObject () const |
bool | derivedFrom (const TRuntimeClassId *pBaseClass) const |
bool | derivedFrom (const char *pBaseClass_name) const |
Public Attributes | |
const char * | className |
mrpt::utils::CObject *(* | 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... | |
CObject * TRuntimeClassId::createObject | ( | ) | const |
Definition at line 93 of file CObject.cpp.
Referenced by mrpt::nav::CParameterizedTrajectoryGenerator::CreatePTG(), mrpt::nav::CMultiObjectiveMotionOptimizerBase::Factory(), mrpt::nav::CAbstractHolonomicReactiveMethod::Factory(), mrpt::utils::CStream::ReadObject(), mrpt::utils::CStream::ReadVariant(), and TEST().
bool TRuntimeClassId::derivedFrom | ( | const TRuntimeClassId * | pBaseClass | ) | const |
Definition at line 32 of file CObject.cpp.
References ASSERT_, getBaseClass, and mrpt::utils::registerAllPendingClasses().
Referenced by mrpt::maps::CPointsMap::determineMatching2D(), mrpt::maps::COccupancyGridMap2D::determineMatching2D(), mrpt::maps::CPointsMap::determineMatching3D(), mrpt::slam::CICP::ICP3D_Method_Classic(), and mrpt::slam::CICP::ICP_Method_LM().
bool TRuntimeClassId::derivedFrom | ( | const char * | pBaseClass_name | ) | const |
Definition at line 61 of file CObject.cpp.
References ASSERTMSG_, mrpt::utils::findRegisteredClass(), mrpt::format(), getBaseClass, and mrpt::utils::registerAllPendingClasses().
const char* mrpt::utils::TRuntimeClassId::className |
Definition at line 34 of file CObject.h.
Referenced by mrpt::utils::CStream::ReadObject(), mrpt::utils::registerClass(), mrpt::opengl::COpenGLViewport::render(), mrpt::maps::CMultiMetricMap::saveMetricMapRepresentationToFile(), TEST(), and mrpt::utils::CStream::WriteObject().
const TRuntimeClassId*(* mrpt::utils::TRuntimeClassId::getBaseClass) () |
Gets the base class runtime id.
Definition at line 38 of file CObject.h.
Referenced by derivedFrom().
mrpt::utils::CObject*(* mrpt::utils::TRuntimeClassId::ptrCreateObject) () |
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 |