StaticNamedSingleton
Engine/source/core/util/namedSingleton.h
Collection of statically registered named singletons.
Public Types
This
Private Static Attributes
Public Functions
StaticNamedSingleton(const char * name)
Public Static Functions
Create a TorqueScript EnumTable that contains all registered instance names.
T *
staticFindSingleton(const char * name)
Find the instance with the given name.
T *
Return the number of registered named singletons.
Detailed Description
Collection of statically registered named singletons.
This class is useful as a mix-in for classes that are supposed to represent a range of named singleton instances from which a specific instance is then selected at run-time.
Parameters:
T | Arbitrary type parameter; identical types will share static data. |
Public Types
typedef StaticNamedSingleton This
Private Attributes
const char * mName
This * mNext
Private Static Attributes
This * smSingletons
Public Functions
StaticNamedSingleton(const char * name)
~StaticNamedSingleton()
getName()
getNext()
Public Static Functions
staticCreateEnumTable()
Create a TorqueScript EnumTable that contains all registered instance names.
staticFindSingleton(const char * name)
Find the instance with the given name.
Returns NULL if no such instance exists.
staticGetFirst()
staticGetNumSingletons()
Return the number of registered named singletons.