|
Torque2D Reference
|
Typedefs | |
| typedef const char *(* | StringCallback) (SimObject *obj, S32 argc, const char *argv[]) |
| typedef S32(* | IntCallback) (SimObject *obj, S32 argc, const char *argv[]) |
| typedef F32(* | FloatCallback) (SimObject *obj, S32 argc, const char *argv[]) |
| typedef void(* | VoidCallback) (SimObject *obj, S32 argc, const char *argv[]) |
| typedef bool(* | BoolCallback) (SimObject *obj, S32 argc, const char *argv[]) |
| typedef void(* | ConsumerCallback) (ConsoleLogEntry::Level level, const char *consoleLine) |
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.
| typedef bool(* BoolCallback) (SimObject *obj, S32 argc, const char *argv[]) |
| typedef void(* ConsumerCallback) (ConsoleLogEntry::Level level, const char *consoleLine) |
| typedef F32(* FloatCallback) (SimObject *obj, S32 argc, const char *argv[]) |
| typedef S32(* IntCallback) (SimObject *obj, S32 argc, const char *argv[]) |
| typedef const char *(* StringCallback) (SimObject *obj, S32 argc, const char *argv[]) |
| typedef void(* VoidCallback) (SimObject *obj, S32 argc, const char *argv[]) |