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 StringGetKeyAt (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. More...
 

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>
Bool Murl::Util::ClassInfoRegistry< ClassInfoType >::Register ( const ClassInfoType &  classInfo)
inline

Register a class info object.

Parameters
classInfoThe class info object to register.
Returns
true if successful or false if a object's class name is already registered.

◆ Unregister()

template<class ClassInfoType>
Bool Murl::Util::ClassInfoRegistry< ClassInfoType >::Unregister ( const ClassInfoType &  classInfo)
inline

Unregister a class info object.

Parameters
classInfoThe 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>
SInt32 Murl::Util::ClassInfoRegistry< ClassInfoType >::GetIndex ( const ClassInfoType &  classInfo) const
inline

Get the index of a registered class info object.

Parameters
classInfoThe 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>
SInt32 Murl::Util::ClassInfoRegistry< ClassInfoType >::GetIndex ( const String className) const
inline

Get the index of a registered class info object by name.

Parameters
classNameThe class name of the object.
Returns
The zero-based index or false if the class name is not registered.

◆ GetCount()

template<class ClassInfoType>
UInt32 Murl::Util::ClassInfoRegistry< ClassInfoType >::GetCount ( ) const
inline

Get the number of registered class info objects.

Returns
The number of registered class info objects.

◆ IsEmpty()

template<class ClassInfoType>
Bool Murl::Util::ClassInfoRegistry< ClassInfoType >::IsEmpty ( ) const
inline

Check if the class info registry is empty.

Returns
true if the class info registry is empty.

◆ Get()

template<class ClassInfoType>
const ClassInfoType* Murl::Util::ClassInfoRegistry< ClassInfoType >::Get ( const String className) const
inline

Get a registered class info object by name.

Parameters
classNameThe class name of the object.
Returns
The class info object or null if the class name is not registered.

◆ GetAt()

template<class ClassInfoType>
const ClassInfoType* Murl::Util::ClassInfoRegistry< ClassInfoType >::GetAt ( UInt32  index) const
inline

Get a registered class info object by index.

Parameters
indexThe index the object.
Returns
The class info object or null if the index is out of range.

◆ GetKeyAt()

template<class ClassInfoType>
const String& Murl::Util::ClassInfoRegistry< ClassInfoType >::GetKeyAt ( UInt32  index) const
inline

Get the (alias) name of a registered class info object by index.

Parameters
indexThe index the object.
Returns
The registered name or an empty string if the index is out of range.

Member Data Documentation

◆ mClassInfos


The documentation for this class was generated from the following file:
  • murl_util_class_info_registry.h


Copyright © 2011-2018 Spraylight GmbH.