Registry of the C++ routines a script command can call by name.
More...
#include <scriptfunction.h>
|
| typedef void(* | Handler) (DataArray *pCommand, void *pUserData) |
| | Routine a script command calls.
|
|
| static void | Register (Handler pfnHandler, const char *pszName, void *pUserData) |
| | Add a command to the registry.
|
| static void | Unregister (Handler pfnHandler) |
| | Remove the command that calls a routine.
|
| static bool | Dispatch (DataArray *pCommand) |
| | Run a script command through the routine registered for its name.
|
Registry of the C++ routines a script command can call by name.
The class name is inferred.
◆ Handler
| typedef void(* ScriptFunction::Handler) (DataArray *pCommand, void *pUserData) |
Routine a script command calls.
The dispatcher ignores the return value.
- Parameters
-
| pCommand | The command, with the command name as its first node. |
| pUserData | The value given to Register(). |
◆ Register()
| void ScriptFunction::Register |
( |
Handler | pfnHandler, |
|
|
const char * | pszName, |
|
|
void * | pUserData ) |
|
static |
Add a command to the registry.
- Parameters
-
| pfnHandler | The routine the command calls. |
| pszName | The command name. |
| pUserData | A value passed back to the handler unchanged. |
- Ghidra address:
- NTSC-U/C: 0x002982c8
- Ghidra address:
- PAL: 0x002a1ed8
◆ Unregister()
| void ScriptFunction::Unregister |
( |
Handler | pfnHandler | ) |
|
|
static |
Remove the command that calls a routine.
- Parameters
-
- Ghidra address:
- NTSC-U/C: 0x00298520
- Ghidra address:
- PAL: 0x002a2130
◆ Dispatch()
| bool ScriptFunction::Dispatch |
( |
DataArray * | pCommand | ) |
|
|
static |
Run a script command through the routine registered for its name.
An unregistered name is passed to DebugPrint().
- Parameters
-
| pCommand | The command, with the command name as its first node. |
- Returns
- Whether a routine was registered for the name.
- Ghidra address:
- NTSC-U/C: 0x00298600
- Ghidra address:
- PAL: 0x002a2210
The documentation for this class was generated from the following file: