Murl::Util::ClassInfoRegistry< ClassInfoType > Class Template Reference
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()
template<class ClassInfoType >
|
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.
◆ Unregister()
template<class ClassInfoType >
|
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.
◆ GetIndex() [1/2]
template<class ClassInfoType >
|
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.
◆ GetIndex() [2/2]
template<class ClassInfoType >
|
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.
◆ GetCount()
template<class ClassInfoType >
|
inline |
Get the number of registered class info objects.
- Returns
- The number of registered class info objects.
◆ IsEmpty()
template<class ClassInfoType >
|
inline |
Check if the class info registry is empty.
- Returns
- true if the class info registry is empty.
◆ Get()
template<class ClassInfoType >
|
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.
◆ GetAt()
template<class ClassInfoType >
|
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.
◆ GetKeyAt()
template<class ClassInfoType >
|
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.
The documentation for this class was generated from the following file:
- murl_util_class_info_registry.h