orx
1.14
Portable Game Engine
|
Data Structures | |
struct | orxCOMMAND_VAR |
struct | orxCOMMAND_VAR_DEF |
Macros | |
#define | orxCOMMAND_KC_BLOCK_MARKER '"' |
#define | orxCOMMAND_KC_GUID_MARKER '^' |
#define | orxCOMMAND_KC_POP_MARKER '<' |
#define | orxCOMMAND_KC_PUSH_MARKER '>' |
#define | orxCOMMAND_KC_SEPARATOR ',' |
#define | orxCOMMAND_REGISTER(NAME, FUNCTION, RESULT_NAME, RESULT_TYPE, REQ_PARAM_NUMBER, OPT_PARAM_NUMBER, ...) |
#define | orxCOMMAND_REGISTER_CORE_COMMAND(MODULE, COMMAND, RESULT_NAME, RESULT_TYPE, REQ_PARAM_NUMBER, OPT_PARAM_NUMBER, ...) |
#define | orxCOMMAND_UNREGISTER(NAME) |
#define | orxCOMMAND_UNREGISTER_CORE_COMMAND(MODULE, COMMAND) |
Typedefs | |
typedef void(orxFASTCALL * | orxCOMMAND_FUNCTION) (orxU32 _u32ArgNumber, const orxCOMMAND_VAR *_astArgList, orxCOMMAND_VAR *_pstResult) |
Functions | |
orxDLLAPI orxSTATUS orxFASTCALL | orxCommand_AddAlias (const orxSTRING _zAlias, const orxSTRING _zCommand, const orxSTRING _zArgs) |
orxDLLAPI orxCOMMAND_VAR *orxFASTCALL | orxCommand_Evaluate (const orxSTRING _zCommandLine, orxCOMMAND_VAR *_pstResult) |
orxDLLAPI orxCOMMAND_VAR *orxFASTCALL | orxCommand_EvaluateWithGUID (const orxSTRING _zCommandLine, orxU64 _u64GUID, orxCOMMAND_VAR *_pstResult) |
orxDLLAPI orxCOMMAND_VAR *orxFASTCALL | orxCommand_Execute (const orxSTRING _zCommand, orxU32 _u32ArgNumber, const orxCOMMAND_VAR *_astArgList, orxCOMMAND_VAR *_pstResult) |
orxDLLAPI void orxFASTCALL | orxCommand_Exit () |
orxDLLAPI const orxSTRING orxFASTCALL | orxCommand_GetNext (const orxSTRING _zBase, const orxSTRING _zPrevious, orxU32 *_pu32CommonLength) |
orxDLLAPI const orxSTRING orxFASTCALL | orxCommand_GetPrototype (const orxSTRING _zCommand) |
orxDLLAPI orxSTATUS orxFASTCALL | orxCommand_Init () |
orxDLLAPI orxBOOL orxFASTCALL | orxCommand_IsAlias (const orxSTRING _zAlias) |
orxDLLAPI orxBOOL orxFASTCALL | orxCommand_IsRegistered (const orxSTRING _zCommand) |
orxDLLAPI orxSTATUS orxFASTCALL | orxCommand_ParseNumericalArguments (orxU32 _u32ArgNumber, const orxCOMMAND_VAR *_astArgList, orxCOMMAND_VAR *_astOperandList) |
orxDLLAPI orxU32 orxFASTCALL | orxCommand_PrintVar (orxSTRING _zDstString, orxU32 _u32Size, const orxCOMMAND_VAR *_pstVar) |
orxDLLAPI orxSTATUS orxFASTCALL | orxCommand_Register (const orxSTRING _zCommand, const orxCOMMAND_FUNCTION _pfnFunction, orxU32 _u32RequiredParamNumber, orxU32 _u32OptionalParamNumber, const orxCOMMAND_VAR_DEF *_astParamList, const orxCOMMAND_VAR_DEF *_pstResult) |
orxDLLAPI orxSTATUS orxFASTCALL | orxCommand_RemoveAlias (const orxSTRING _zAlias) |
orxDLLAPI void orxFASTCALL | orxCommand_Setup () |
orxDLLAPI orxSTATUS orxFASTCALL | orxCommand_Unregister (const orxSTRING _zCommand) |
Command module Module that can execute custom registered commands.
#define orxCOMMAND_KC_BLOCK_MARKER '"' |
MiscBlock marker character
Definition at line 50 of file orxCommand.h.
#define orxCOMMAND_KC_GUID_MARKER '^' |
GUID marker character
Definition at line 53 of file orxCommand.h.
#define orxCOMMAND_KC_POP_MARKER '<' |
Pop marker character
Definition at line 52 of file orxCommand.h.
#define orxCOMMAND_KC_PUSH_MARKER '>' |
Push marker character
Definition at line 51 of file orxCommand.h.
#define orxCOMMAND_KC_SEPARATOR ',' |
Command separator character
Definition at line 54 of file orxCommand.h.
#define orxCOMMAND_REGISTER | ( | NAME, | |
FUNCTION, | |||
RESULT_NAME, | |||
RESULT_TYPE, | |||
REQ_PARAM_NUMBER, | |||
OPT_PARAM_NUMBER, | |||
... | |||
) |
Definition at line 130 of file orxCommand.h.
#define orxCOMMAND_REGISTER_CORE_COMMAND | ( | MODULE, | |
COMMAND, | |||
RESULT_NAME, | |||
RESULT_TYPE, | |||
REQ_PARAM_NUMBER, | |||
OPT_PARAM_NUMBER, | |||
... | |||
) |
Command registration helpers
Definition at line 112 of file orxCommand.h.
#define orxCOMMAND_UNREGISTER | ( | NAME | ) |
Definition at line 142 of file orxCommand.h.
#define orxCOMMAND_UNREGISTER_CORE_COMMAND | ( | MODULE, | |
COMMAND | |||
) |
Definition at line 124 of file orxCommand.h.
typedef void(orxFASTCALL * orxCOMMAND_FUNCTION) (orxU32 _u32ArgNumber, const orxCOMMAND_VAR *_astArgList, orxCOMMAND_VAR *_pstResult) |
Command function type
Definition at line 107 of file orxCommand.h.
enum orxCOMMAND_VAR_TYPE |
Variable type enum
Definition at line 59 of file orxCommand.h.
orxDLLAPI orxSTATUS orxFASTCALL orxCommand_AddAlias | ( | const orxSTRING | _zAlias, |
const orxSTRING | _zCommand, | ||
const orxSTRING | _zArgs | ||
) |
Adds a command alias
[in] | _zAlias | Command alias |
[in] | _zCommand | Command name |
[in] | _zArgs | Command argument, orxNULL for none |
orxDLLAPI orxCOMMAND_VAR* orxFASTCALL orxCommand_Evaluate | ( | const orxSTRING | _zCommandLine, |
orxCOMMAND_VAR * | _pstResult | ||
) |
Evaluates a command
[in] | _zCommandLine | Command name + arguments |
[out] | _pstResult | Variable that will contain the result |
orxDLLAPI orxCOMMAND_VAR* orxFASTCALL orxCommand_EvaluateWithGUID | ( | const orxSTRING | _zCommandLine, |
orxU64 | _u64GUID, | ||
orxCOMMAND_VAR * | _pstResult | ||
) |
Evaluates a command with a specific GUID
[in] | _zCommandLine | Command name + arguments |
[in] | _u64GUID | GUID to use in place of the GUID markers in the command |
[out] | _pstResult | Variable that will contain the result |
orxDLLAPI orxCOMMAND_VAR* orxFASTCALL orxCommand_Execute | ( | const orxSTRING | _zCommand, |
orxU32 | _u32ArgNumber, | ||
const orxCOMMAND_VAR * | _astArgList, | ||
orxCOMMAND_VAR * | _pstResult | ||
) |
Executes a command
[in] | _zCommand | Command name |
[in] | _u32ArgNumber | Number of arguments sent to the command |
[in] | _astArgList | List of arguments sent to the command |
[out] | _pstResult | Variable that will contain the result |
orxDLLAPI const orxSTRING orxFASTCALL orxCommand_GetNext | ( | const orxSTRING | _zBase, |
const orxSTRING | _zPrevious, | ||
orxU32 * | _pu32CommonLength | ||
) |
Gets next command using an optional base
[in] | _zBase | Base name, can be set to orxNULL for no base |
[in] | _zPrevious | Previous command, orxNULL to get the first command |
[out] | _pu32CommonLength | Length of the common prefix of all potential results, orxNULL to ignore |
orxDLLAPI const orxSTRING orxFASTCALL orxCommand_GetPrototype | ( | const orxSTRING | _zCommand | ) |
Gets a command's (text) prototype (beware: result won't persist from one call to the other)
[in] | _zCommand | Command name |
Inits the command module
orxDLLAPI orxBOOL orxFASTCALL orxCommand_IsAlias | ( | const orxSTRING | _zAlias | ) |
Is a command alias?
[in] | _zAlias | Command alias |
orxDLLAPI orxBOOL orxFASTCALL orxCommand_IsRegistered | ( | const orxSTRING | _zCommand | ) |
Is a command registered?
[in] | _zCommand | Command name |
orxDLLAPI orxSTATUS orxFASTCALL orxCommand_ParseNumericalArguments | ( | orxU32 | _u32ArgNumber, |
const orxCOMMAND_VAR * | _astArgList, | ||
orxCOMMAND_VAR * | _astOperandList | ||
) |
Parses numerical arguments, string arguments will be evaluated to vectors or float when possible
[in] | _u32ArgNumber | Number of arguments to parse |
[in] | _astArgList | List of arguments to parse |
[out] | _astOperandList | List of parsed arguments |
orxDLLAPI orxU32 orxFASTCALL orxCommand_PrintVar | ( | orxSTRING | _zDstString, |
orxU32 | _u32Size, | ||
const orxCOMMAND_VAR * | _pstVar | ||
) |
Prints a variable to a buffer, according to its type (and ignoring any bloc/special character)
[out] | _zDstString | Destination string |
[in] | _u32Size | Available string size, including terminating null character |
[in] | _pstVar | Variable to print |
orxDLLAPI orxSTATUS orxFASTCALL orxCommand_Register | ( | const orxSTRING | _zCommand, |
const orxCOMMAND_FUNCTION | _pfnFunction, | ||
orxU32 | _u32RequiredParamNumber, | ||
orxU32 | _u32OptionalParamNumber, | ||
const orxCOMMAND_VAR_DEF * | _astParamList, | ||
const orxCOMMAND_VAR_DEF * | _pstResult | ||
) |
Registers a command
[in] | _zCommand | Command name |
[in] | _pfnFunction | Associated function |
[in] | _u32RequiredParamNumber | Number of required parameters of the command |
[in] | _u32OptionalParamNumber | Number of optional parameters of the command |
[in] | _astParamList | List of parameters of the command |
[in] | _pstResult | Result |
Removes a command alias
[in] | _zAlias | Command alias |