Main MRPT website > C++ reference for MRPT 1.9.9
Classes | Typedefs | Functions | Variables
mrpt::rtti Namespace Reference

Classes

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  CLASSINIT
 Auxiliary structure used for CObject-based RTTI. More...
 
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...
 
class  CObject
 The virtual base class of all MRPT classes with a unified RTTI system. More...
 
struct  IS_CLASS_impl
 
struct  queue_register_functions_t
 
struct  TRuntimeClassId
 A structure that holds runtime class type information. More...
 

Typedefs

using TClassnameToRuntimeId = std::map< std::string, const TRuntimeClassId * >
 
using TRegisterFunction = void(*)()
 

Functions

std::atomic< int > & pending_class_registers_count ()
 
queue_register_functions_tpending_class_registers ()
 

Variables

bool pending_class_registers_modified = false
 Set to true if pending_class_registers() has been called after registerAllPendingClasses(). More...
 

Typedef Documentation

◆ TClassnameToRuntimeId

Definition at line 48 of file internal_class_registry.cpp.

◆ TRegisterFunction

using mrpt::rtti::TRegisterFunction = typedef void (*)()

Definition at line 19 of file internal_class_registry.h.

Function Documentation

◆ CLASS_ID_impl()

template<typename T >
constexpr const mrpt::rtti::TRuntimeClassId* mrpt::rtti::CLASS_ID_impl ( )
constexpr

Definition at line 78 of file CObject.h.

◆ classFactory()

mrpt::rtti::CObject * mrpt::rtti::classFactory ( const std::string className)

Creates an object given by its registered name.

See also
findRegisteredClass(), registerClass(), classFactoryPtr()

Definition at line 109 of file CObject.cpp.

References findRegisteredClass().

◆ classFactoryPtr()

mrpt::rtti::CObject::Ptr mrpt::rtti::classFactoryPtr ( const std::string className)

Like classFactory() but returns a smart pointer.

Examples
rtti_example1/test.cpp.

Definition at line 116 of file CObject.cpp.

References findRegisteredClass().

Referenced by TEST().

◆ findRegisteredClass()

const TRuntimeClassId * mrpt::rtti::findRegisteredClass ( const std::string className)

◆ getAllRegisteredClasses()

std::vector< const TRuntimeClassId * > mrpt::rtti::getAllRegisteredClasses ( )

◆ getAllRegisteredClassesChildrenOf()

std::vector< const TRuntimeClassId * > mrpt::rtti::getAllRegisteredClassesChildrenOf ( const TRuntimeClassId parent_id)

◆ pending_class_registers()

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().

◆ pending_class_registers_count()

std::atomic< int > & mrpt::rtti::pending_class_registers_count ( )

Definition at line 30 of file internal_class_registry.cpp.

Referenced by registerAllPendingClasses().

◆ registerAllPendingClasses()

void mrpt::rtti::registerAllPendingClasses ( )

◆ registerClass()

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...

See also
getAllRegisteredClasses
Examples
rtti_example1/test.cpp.

Definition at line 155 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(), MRPT_INITIALIZER(), and TEST().

◆ registerClassCustomName()

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,...)

Examples
rtti_example1/test.cpp.

Definition at line 168 of file internal_class_registry.cpp.

References mrpt::rtti::CClassRegistry::Add(), mrpt::rtti::CClassRegistry::Instance(), and registerAllPendingClasses().

Variable Documentation

◆ pending_class_registers_modified

bool mrpt::rtti::pending_class_registers_modified = false

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.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST