|
MRPT
1.9.9
|
Classes | |
| class | CListOfClasses |
| A list (actually based on a std::set) of MRPT classes, capable of keeping any class registered by the mechanism of CObject classes. More... | |
| struct | TRuntimeClassId |
| A structure that holds runtime class type information. More... | |
| struct | IS_CLASS_impl |
| struct | CLASSINIT |
| Auxiliary structure used for CObject-based RTTI. More... | |
| class | CObject |
| The virtual base class of all MRPT classes with a unified RTTI system. More... | |
| class | CClassRegistry |
| A singleton with the central registry for CSerializable run-time classes: users do not use this class in any direct way. More... | |
| struct | queue_register_functions_t |
Typedefs | |
| using | TClassnameToRuntimeId = std::map< std::string, const TRuntimeClassId * > |
| using | TRegisterFunction = void(*)() |
Functions | |
| std::atomic< int > & | pending_class_registers_count () |
| queue_register_functions_t & | pending_class_registers () |
RTTI classes and functions for polymorphic hierarchies | |
| void | registerClass (const mrpt::rtti::TRuntimeClassId *pNewClass) |
| Register a class into the MRPT internal list of "CObject" descendents. More... | |
| void | registerClassCustomName (const char *customName, const TRuntimeClassId *pNewClass) |
| Mostly for internal use within mrpt sources, to handle exceptional cases with multiple serialization names for backward compatibility (CMultiMetricMaps, CImage,...) More... | |
| std::vector< const mrpt::rtti::TRuntimeClassId * > | getAllRegisteredClasses () |
| Returns a list with all the classes registered in the system through mrpt::rtti::registerClass. More... | |
| std::vector< const TRuntimeClassId * > | getAllRegisteredClassesChildrenOf (const TRuntimeClassId *parent_id) |
| Like getAllRegisteredClasses(), but filters the list to only include children clases of a given base one. More... | |
| const TRuntimeClassId * | findRegisteredClass (const std::string &className) |
| Return info about a given class by its name, or nullptr if the class is not registered. More... | |
| template<typename T > | |
| constexpr const mrpt::rtti::TRuntimeClassId * | CLASS_ID_impl () |
| void | registerAllPendingClasses () |
| Register all pending classes - to be called just before de-serializing an object, for example. More... | |
| mrpt::rtti::CObject * | classFactory (const std::string &className) |
| Creates an object given by its registered name. More... | |
| mrpt::rtti::CObject::Ptr | classFactoryPtr (const std::string &className) |
| Like classFactory() but returns a smart pointer. More... | |
Variables | |
| bool | pending_class_registers_modified = false |
| Set to true if pending_class_registers() has been called after registerAllPendingClasses(). More... | |
| using mrpt::rtti::TClassnameToRuntimeId = typedef std::map<std::string, const TRuntimeClassId*> |
Definition at line 46 of file internal_class_registry.cpp.
| using mrpt::rtti::TRegisterFunction = typedef void (*)() |
Definition at line 17 of file internal_class_registry.h.
|
constexpr |
| mrpt::rtti::CObject * mrpt::rtti::classFactory | ( | const std::string & | className | ) |
Creates an object given by its registered name.
Definition at line 109 of file CObject.cpp.
References findRegisteredClass().
| mrpt::rtti::CObject::Ptr mrpt::rtti::classFactoryPtr | ( | const std::string & | className | ) |
Like classFactory() but returns a smart pointer.
Definition at line 116 of file CObject.cpp.
References findRegisteredClass().
Referenced by TEST().
| const TRuntimeClassId * mrpt::rtti::findRegisteredClass | ( | const std::string & | className | ) |
Return info about a given class by its name, or nullptr if the class is not registered.
Definition at line 199 of file internal_class_registry.cpp.
References mrpt::rtti::CClassRegistry::Get(), and mrpt::rtti::CClassRegistry::Instance().
Referenced by classFactory(), classFactoryPtr(), mrpt::nav::CParameterizedTrajectoryGenerator::CreatePTG(), mrpt::rtti::TRuntimeClassId::derivedFrom(), mrpt::nav::CAbstractHolonomicReactiveMethod::Factory(), mrpt::nav::CMultiObjectiveMotionOptimizerBase::Factory(), mrpt::rtti::CListOfClasses::fromString(), mrpt::serialization::CArchive::ReadObject(), and mrpt::serialization::CArchive::ReadVariant().
| std::vector< const TRuntimeClassId * > mrpt::rtti::getAllRegisteredClasses | ( | ) |
Returns a list with all the classes registered in the system through mrpt::rtti::registerClass.
Definition at line 175 of file internal_class_registry.cpp.
References mrpt::rtti::CClassRegistry::getListOfAllRegisteredClasses(), and mrpt::rtti::CClassRegistry::Instance().
Referenced by getAllRegisteredClassesChildrenOf().
| std::vector< const TRuntimeClassId * > mrpt::rtti::getAllRegisteredClassesChildrenOf | ( | const TRuntimeClassId * | parent_id | ) |
Like getAllRegisteredClasses(), but filters the list to only include children clases of a given base one.
Definition at line 181 of file internal_class_registry.cpp.
References getAllRegisteredClasses().
Referenced by mrpt::nav::CAbstractPTGBasedReactive::saveConfigFile(), and mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams::saveToConfigFile().
| queue_register_functions_t & mrpt::rtti::pending_class_registers | ( | ) |
Definition at line 37 of file internal_class_registry.cpp.
References pending_class_registers_modified.
Referenced by registerAllPendingClasses().
| std::atomic< int > & mrpt::rtti::pending_class_registers_count | ( | ) |
Definition at line 30 of file internal_class_registry.cpp.
Referenced by registerAllPendingClasses().
| void mrpt::rtti::registerAllPendingClasses | ( | ) |
Register all pending classes - to be called just before de-serializing an object, for example.
After calling this method, pending_class_registers_modified is set to false until pending_class_registers() is invoked.
Definition at line 130 of file internal_class_registry.cpp.
References mrpt::rtti::queue_register_functions_t::get(), pending_class_registers(), pending_class_registers_count(), and pending_class_registers_modified.
Referenced by mrpt::nav::CParameterizedTrajectoryGenerator::CreatePTG(), mrpt::rtti::TRuntimeClassId::derivedFrom(), mrpt::nav::CAbstractHolonomicReactiveMethod::Factory(), mrpt::nav::CMultiObjectiveMotionOptimizerBase::Factory(), registerClass(), and registerClassCustomName().
| void mrpt::rtti::registerClass | ( | const mrpt::rtti::TRuntimeClassId * | pNewClass | ) |
Register a class into the MRPT internal list of "CObject" descendents.
Used internally in the macros DEFINE_SERIALIZABLE, etc...
Definition at line 152 of file internal_class_registry.cpp.
References mrpt::rtti::CClassRegistry::Add(), mrpt::rtti::TRuntimeClassId::className, mrpt::rtti::CClassRegistry::Instance(), and registerAllPendingClasses().
Referenced by mrpt::rtti::CLASSINIT::CLASSINIT(), do_register(), and MRPT_INITIALIZER().
| void mrpt::rtti::registerClassCustomName | ( | const char * | customName, |
| const TRuntimeClassId * | pNewClass | ||
| ) |
Mostly for internal use within mrpt sources, to handle exceptional cases with multiple serialization names for backward compatibility (CMultiMetricMaps, CImage,...)
For internal use within mrpt sources, and only in exceptional cases (CMultiMetricMaps, CImage,...)
Definition at line 165 of file internal_class_registry.cpp.
References mrpt::rtti::CClassRegistry::Add(), mrpt::rtti::CClassRegistry::Instance(), and registerAllPendingClasses().
|
extern |
Set to true if pending_class_registers() has been called after registerAllPendingClasses().
Startup value is false.
Definition at line 27 of file internal_class_registry.cpp.
Referenced by pending_class_registers(), and registerAllPendingClasses().
| Page generated by Doxygen 1.9.1 for MRPT 1.9.9 Git: 814d80880 Fri Aug 24 01:51:28 2018 +0200 at mar 26 may 2026 12:30:59 CEST |