The class info registration container. More...
#include "murl_util_class_info_registry.h"
Public Member Functions | |
Bool | Register (const ClassInfoType &classInfo) |
Register a class info object. More... | |
Bool | Unregister (const ClassInfoType &classInfo) |
Unregister a class info object. More... | |
SInt32 | GetIndex (const ClassInfoType &classInfo) const |
Get the index of a registered class info object. More... | |
SInt32 | GetIndex (const String &className) const |
Get the index of a registered class info object by name. More... | |
UInt32 | GetCount () const |
Get the number of registered class info objects. More... | |
Bool | IsEmpty () const |
Check if the class info registry is empty. More... | |
const ClassInfoType * | Get (const String &className) const |
Get a registered class info object by name. More... | |
const ClassInfoType * | GetAt (UInt32 index) const |
Get a registered class info object by index. More... | |
const String & | GetKeyAt (UInt32 index) const |
Get the (alias) name of a registered class info object by index. More... | |
Protected Attributes | |
Map< String, const ClassInfoType * > | mClassInfos |
The registered class info objects mapped by the class name. | |
Detailed Description
template<class ClassInfoType>
class Murl::Util::ClassInfoRegistry< ClassInfoType >
The class info registration container.
Objects derived from IFactoryObject can be registered.
Member Function Documentation
◆ Register()
|
inline |
Register a class info object.
- Parameters
-
classInfo The class info object to register.
- Returns
- true if successful or false if a object's class name is already registered.
References Murl::String::IsEmpty(), Murl::Util::ClassInfoRegistry< ClassInfoType >::mClassInfos, and Murl::Util::StripCppScope().
◆ Unregister()
|
inline |
Unregister a class info object.
- Parameters
-
classInfo The class info object to unregister.
- Returns
- true if successful or false if the object's class name is not registered.
References Murl::String::IsEmpty(), Murl::Util::ClassInfoRegistry< ClassInfoType >::mClassInfos, and Murl::Util::StripCppScope().
◆ GetIndex() [1/2]
|
inline |
Get the index of a registered class info object.
- Parameters
-
classInfo The class info object.
- Returns
- The zero-based index or false if the object's class name is not registered.
References Murl::Util::ClassInfoRegistry< ClassInfoType >::mClassInfos.
◆ GetIndex() [2/2]
|
inline |
Get the index of a registered class info object by name.
- Parameters
-
className The class name of the object.
- Returns
- The zero-based index or false if the class name is not registered.
References Murl::Util::ClassInfoRegistry< ClassInfoType >::mClassInfos.
◆ GetCount()
|
inline |
Get the number of registered class info objects.
- Returns
- The number of registered class info objects.
References Murl::Util::ClassInfoRegistry< ClassInfoType >::mClassInfos.
◆ IsEmpty()
|
inline |
Check if the class info registry is empty.
- Returns
- true if the class info registry is empty.
References Murl::Util::ClassInfoRegistry< ClassInfoType >::mClassInfos.
◆ Get()
|
inline |
Get a registered class info object by name.
- Parameters
-
className The class name of the object.
- Returns
- The class info object or null if the class name is not registered.
References Murl::Util::ClassInfoRegistry< ClassInfoType >::mClassInfos.
◆ GetAt()
|
inline |
Get a registered class info object by index.
- Parameters
-
index The index the object.
- Returns
- The class info object or null if the index is out of range.
References Murl::Util::ClassInfoRegistry< ClassInfoType >::mClassInfos.
◆ GetKeyAt()
|
inline |
Get the (alias) name of a registered class info object by index.
- Parameters
-
index The index the object.
- Returns
- The registered name or an empty string if the index is out of range.
References Murl::Util::ClassInfoRegistry< ClassInfoType >::mClassInfos, and Murl::Util::StaticEmptyString().
The documentation for this class was generated from the following file:
- murl_util_class_info_registry.h