Torque3D Documentation / _generateds / Scripting Engine Callbacks

Scripting Engine Callbacks

The scripting engine makes heavy use of callbacks to represent function exposed to the scripting language.

More...

Typedefs

bool(*
BoolCallback )(SimObject *obj, S32 argc, ConsoleValueRef argv[])
void(*
ConsumerCallback )(U32 level, const char *consoleLine)
F32(*
FloatCallback )(SimObject *obj, S32 argc, ConsoleValueRef argv[])
S32(*
IntCallback )(SimObject *obj, S32 argc, ConsoleValueRef argv[])
const char *(*
StringCallback )(SimObject *obj, S32 argc, ConsoleValueRef argv[])
void(*
VoidCallback )(SimObject *obj, S32 argc, ConsoleValueRef argv[])

Detailed Description

The scripting engine makes heavy use of callbacks to represent function exposed to the scripting language.

StringCallback, IntCallback, FloatCallback, VoidCallback, and BoolCallback all represent exposed script functions returning different types.

ConsumerCallback is used with the function Con::addConsumer; functions registered with Con::addConsumer are called whenever something is outputted to the console. For instance, the TelnetConsole registers itself with the console so it can echo the console over the network.

note:

Callbacks to the scripting language - for instance, onExit(), which is a script function called when the engine is shutting down - are handled using Con::executef() and kin.

Typedefs

typedef bool(* BoolCallback )(SimObject *obj, S32 argc, ConsoleValueRef argv[])
typedef void(* ConsumerCallback )(U32 level, const char *consoleLine)
typedef F32(* FloatCallback )(SimObject *obj, S32 argc, ConsoleValueRef argv[])
typedef S32(* IntCallback )(SimObject *obj, S32 argc, ConsoleValueRef argv[])
typedef const char *(* StringCallback )(SimObject *obj, S32 argc, ConsoleValueRef argv[])
typedef void(* VoidCallback )(SimObject *obj, S32 argc, ConsoleValueRef argv[])