class TScriptTypeDefinition

template<typename SelfType>

Templated base class that provides information about a script type that maps to a native type.

For each script type you should inherit this class and specify the B3D_SCRIPT_TYPE_DEFINITON macro that lets you specify the information about the script type.

Optionally you may also specify a static void SetupScriptBindings() method, that you may use to bind to script methods, so they trigger in native code when script code is called. This method will trigger when script assemblies are loaded or reloaded.

You may also optionally specify a `static void InitializeAdditionalMetaData(ScriptTypeMetaData

&

)` method that allows your class append additional information to the meta-data structure, if needed. Generally this includes the RTTI ID, or specialized creation callbacks required for creating native objects of the type. This method will trigger once when the application starts up, or the library containing the class is loaded.

Template parameters

SelfType

Type that derives from TScriptTypeDefinition

<SelfType

and specified the B3D_SCRIPT_TYPE_DEFINITON() macro, and optionally the two static methods mentioned above.

Public

Constructors

TScriptTypeDefinition<SelfType>

Methods

staticGetMetaData

static const ScriptTypeMetaData *GetMetaData()

Returns the meta-data storing information about the script type.

staticInitializeMetaDataAtLoadTime

static void InitializeMetaDataAtLoadTime()

Takes care of initializing the meta-data when the application first load.

The meta-data will be registered with a global manager that will ensure it is kept up-to-date after operations such as assembly (re)load.