Torque3D Documentation / _generateds / StaticNamedSingleton

StaticNamedSingleton

Engine/source/core/util/namedSingleton.h

Collection of statically registered named singletons.

More...

Public Types

Private Attributes

const char *

Private Static Attributes

Public Functions

Public Static Functions

Create a TorqueScript EnumTable that contains all registered instance names.

T *

Find the instance with the given name.

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.