RuntimeClassRep< T > Class Template Reference

#include <runtimeClassRep.h>

Inheritance diagram for RuntimeClassRep< T >:

Inheritance graph
[legend]
List of all members.

Detailed Description


template<class T> class RuntimeClassRep< T >

This class is to allow new types to be added, at run-time, to Torque.

This is primarily for dynamic libraries, plugins etc.

The idea is the same, one instance per type which is getting registered however it doesn't get added to the dictionary until it is told to add itself. It can be removed, as well, though no safe-execution assurances are made by this class. If an object type is removed behavior of existing console objects of that type is undefined. (aka bad stuff will probably happen but I don't know exactly what)


Public Member Functions

 RuntimeClassRep (const char *name, S32 netClassGroupMask, S32 netClassType, S32 netEventDir, AbstractClassRep *parent)
void init () const
 Perform class specific initialization tasks.
ConsoleObjectcreate () const
 Wrap constructor.
void consoleRegister ()
 Register this class with the Torque console.
void consoleUnRegister ()
 Unregister this class with the Torque console.

Static Public Member Functions

static const bool isRegistered ()
 Returns true if this class type is registered with the console system.

Static Protected Attributes

static bool smConRegistered = false
 This variable will be set to true if this class-rep is currently registered.


Constructor & Destructor Documentation

template<class T>
RuntimeClassRep< T >::RuntimeClassRep ( const char *  name,
S32  netClassGroupMask,
S32  netClassType,
S32  netEventDir,
AbstractClassRep parent 
) [inline]


Member Function Documentation

template<class T>
void RuntimeClassRep< T >::init (  )  const [inline, virtual]

Perform class specific initialization tasks.

Link namespaces, call initPersistFields() and consoleInit().

Implements AbstractClassRep.

template<class T>
ConsoleObject* RuntimeClassRep< T >::create (  )  const [inline, virtual]

Wrap constructor.

Implements AbstractClassRep.

template<class T>
void RuntimeClassRep< T >::consoleRegister (  )  [inline]

Register this class with the Torque console.

template<class T>
void RuntimeClassRep< T >::consoleUnRegister (  )  [inline]

Unregister this class with the Torque console.

template<class T>
static const bool RuntimeClassRep< T >::isRegistered (  )  [inline, static]

Returns true if this class type is registered with the console system.


Member Data Documentation

template<class T>
bool RuntimeClassRep< T >::smConRegistered = false [static, protected]

This variable will be set to true if this class-rep is currently registered.