MRPT  2.0.4
List of all members | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes
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, const bool allow_ignore_namespace)
 
std::vector< const TRuntimeClassId * > getListOfAllRegisteredClasses ()
 

Static Public Member Functions

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

Static Private Member Functions

static std::string stripNamespace (const std::string &n)
 

Private Attributes

TClassnameToRuntimeId m_ns_classes
 
TClassnameToRuntimeId m_no_ns_classes
 
std::mutex m_cs
 
std::atomic< bool > m_being_modified {false}
 

Member Function Documentation

◆ Add()

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

Definition at line 63 of file internal_class_registry.cpp.

References mrpt::format(), m_being_modified, m_cs, m_no_ns_classes, m_ns_classes, and stripNamespace().

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

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

◆ Get()

const TRuntimeClassId* mrpt::rtti::CClassRegistry::Get ( const std::string &  className,
const bool  allow_ignore_namespace 
)
inline

Definition at line 90 of file internal_class_registry.cpp.

References m_being_modified, m_cs, m_no_ns_classes, m_ns_classes, and stripNamespace().

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

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

◆ getListOfAllRegisteredClasses()

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

Definition at line 122 of file internal_class_registry.cpp.

References m_cs, and m_ns_classes.

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

◆ stripNamespace()

static std::string mrpt::rtti::CClassRegistry::stripNamespace ( const std::string &  n)
inlinestaticprivate

Definition at line 133 of file internal_class_registry.cpp.

Referenced by Add(), and Get().

Here is the caller graph for this function:

Member Data Documentation

◆ m_being_modified

std::atomic<bool> mrpt::rtti::CClassRegistry::m_being_modified {false}
private

Definition at line 153 of file internal_class_registry.cpp.

Referenced by Add(), and Get().

◆ m_cs

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

Definition at line 152 of file internal_class_registry.cpp.

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

◆ m_no_ns_classes

TClassnameToRuntimeId mrpt::rtti::CClassRegistry::m_no_ns_classes
private

Definition at line 150 of file internal_class_registry.cpp.

Referenced by Add(), and Get().

◆ m_ns_classes

TClassnameToRuntimeId mrpt::rtti::CClassRegistry::m_ns_classes
private

Definition at line 147 of file internal_class_registry.cpp.

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




Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020