MRPT  1.9.9
mrpt::rtti::CClassRegistry Class Reference

Detailed Description

A singleton with the central registry for CSerializable run-time classes: users do not use this class in any direct way.

Note
Class is thread-safe.

Definition at line 52 of file internal_class_registry.cpp.

Public Member Functions

void Add (const std::string &className, const TRuntimeClassId &id)
 
const TRuntimeClassIdGet (const std::string &className)
 
std::vector< const TRuntimeClassId * > getListOfAllRegisteredClasses ()
 

Static Public Member Functions

static CClassRegistryInstance ()
 The unique access point point to the singleton instance. More...
 

Private Member Functions

 CClassRegistry ()
 
 ~CClassRegistry ()
 

Private Attributes

TClassnameToRuntimeId registeredClasses
 
std::mutex m_cs
 
std::atomic< bool > m_being_modified
 

Constructor & Destructor Documentation

◆ CClassRegistry()

mrpt::rtti::CClassRegistry::CClassRegistry ( )
inlineprivate

Definition at line 114 of file internal_class_registry.cpp.

◆ ~CClassRegistry()

mrpt::rtti::CClassRegistry::~CClassRegistry ( )
inlineprivate

Definition at line 116 of file internal_class_registry.cpp.

Member Function Documentation

◆ Add()

void mrpt::rtti::CClassRegistry::Add ( const std::string className,
const TRuntimeClassId id 
)
inline

◆ Get()

const TRuntimeClassId* mrpt::rtti::CClassRegistry::Get ( const std::string className)
inline

Definition at line 87 of file internal_class_registry.cpp.

References m_being_modified, m_cs, and registeredClasses.

Referenced by mrpt::rtti::findRegisteredClass().

◆ getListOfAllRegisteredClasses()

std::vector<const TRuntimeClassId*> mrpt::rtti::CClassRegistry::getListOfAllRegisteredClasses ( )
inline

Definition at line 101 of file internal_class_registry.cpp.

References m_cs, and registeredClasses.

Referenced by mrpt::rtti::getAllRegisteredClasses().

◆ Instance()

static CClassRegistry& mrpt::rtti::CClassRegistry::Instance ( )
inlinestatic

The unique access point point to the singleton instance.

Definition at line 57 of file internal_class_registry.cpp.

Referenced by mrpt::rtti::findRegisteredClass(), mrpt::rtti::getAllRegisteredClasses(), mrpt::rtti::registerClass(), and mrpt::rtti::registerClassCustomName().

Member Data Documentation

◆ m_being_modified

std::atomic<bool> mrpt::rtti::CClassRegistry::m_being_modified
private

Definition at line 122 of file internal_class_registry.cpp.

Referenced by Add(), and Get().

◆ m_cs

std::mutex mrpt::rtti::CClassRegistry::m_cs
private

Definition at line 121 of file internal_class_registry.cpp.

Referenced by Add(), Get(), and getListOfAllRegisteredClasses().

◆ registeredClasses

TClassnameToRuntimeId mrpt::rtti::CClassRegistry::registeredClasses
private

Definition at line 120 of file internal_class_registry.cpp.

Referenced by Add(), Get(), and getListOfAllRegisteredClasses().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020