group Executor

Description

These functions allow for the execution of code. The main interface is ferite_script_execute(), but to execute individual functions there is ferite_call_function(). There are other convinience functions.

group attributes
function ferite_stop_execution() - Stop the script executing
function ferite_is_executing() - Return whether a script is executing
function ferite_script_execute() - Run a script
function ferite_script_function_execute() - Execute a function within a script
function ferite_script_real_function_execute() - Execute a eval operator compiled script
function ferite_clean_up_exec_rec() - Clean up and Execution Record
function ferite_create_parameter_list() - Create a parameter list, NULLify it and then return it
function ferite_add_to_parameter_list() - Place a parameter within the next availible place within the parameter list
function ferite_delete_parameter_list() - Delete a parameter list, and destroy any disposable variables
function ferite_create_parameter_list_from_data() - This function is used to make creating a parameter list very easy.
function ferite_call_function() - This will call any function from it's function pointer and a parameter list

Functions

function ferite_stop_execution Click to go up to the list
Stop the script executing
Declaration:
    void ferite_stop_execution( FeriteScript *script )
Parameters:
    Parameter #1: FeriteScript *script - The script to stop

function ferite_is_executing Click to go up to the list
Return whether a script is executing
Declaration:
    int ferite_is_executing( FeriteScript *script )
Parameters:
    Parameter #1: FeriteScript *script - The script to query
Returns:
    FE_TRUE if the script is executing, FE_FALSE otherwise

function ferite_script_execute Click to go up to the list
Run a script
Declaration:
    int ferite_script_execute( FeriteScript *script )
Parameters:
    Parameter #1: FeriteScript *script - The script to run
Returns:
    FE_TRUE on successfull execution, FE_FALSE otherwise

function ferite_script_function_execute Click to go up to the list
Execute a function within a script
Declaration:
    int ferite_script_function_execute( FeriteScript *script, FeriteFunction *function, FeriteVariable **params )
Parameters:
    Parameter #1: FeriteScript *script - The current script
    Parameter #2: FeriteFunction *function - The function to execute
    Parameter #3: FeriteVariable **params - The calling arguments
Returns:
    The variable returned from the function

function ferite_script_real_function_execute Click to go up to the list
Execute a eval operator compiled script
Declaration:
    FeriteVariable *ferite_script_real_function_execute( FeriteScript *script, FeriteFunction *function, FeriteNamespace *ns, FeriteExecuteRec *exec, FeriteVariable **params )
Parameters:
    Parameter #1: FeriteScript *script - The current script to run
    Parameter #2: FeriteFunction *function - The function to execute
    Parameter #3: FeriteNamespace *ns - The scripts main namespace
    Parameter #4: FeriteExecuteRec *exec - The execute records for the current script
    Parameter #5: FeriteVariable **params - The parameters passed to the function
Returns:
    The return value from the function on successfull execution, NULL otherwise

function ferite_clean_up_exec_rec Click to go up to the list
Clean up and Execution Record
Declaration:
    void ferite_clean_up_exec_rec( FeriteScript *script, FeriteExecuteRec *exec )
Parameters:
    Parameter #1: FeriteScript *script - The current script
    Parameter #2: FeriteExecuteRex *exec - Pointer to the execution record

function ferite_create_parameter_list Click to go up to the list
Create a parameter list, NULLify it and then return it
Declaration:
    FeriteVariable **ferite_create_parameter_list( int size )
Parameters:
    Parameter #1: int size - The number of parameters to hold
Returns:
    The created list

function ferite_add_to_parameter_list Click to go up to the list
Place a parameter within the next availible place within the parameter list
Declaration:
    FeriteVariable **ferite_add_to_parameter_list( FeriteVariable **list, FeriteVariable *var )
Parameters:
    Parameter #1: FeriteVariable **list - The list to place it in
    Parameter #2: FeriteVariable *var - The variable to place within the list
Returns:
    The list passed to the function

function ferite_delete_parameter_list Click to go up to the list
Delete a parameter list, and destroy any disposable variables
Declaration:
    void ferite_delete_parameter_list( FeriteScript *script, FeriteVariable **list )
Parameters:
    Parameter #1: FeriteScript *script - The current script
    Parameter #2: FeriteVariable **list - The list to be deleted

function ferite_create_parameter_list_from_data Click to go up to the list
This function is used to make creating a parameter list very easy.
Declaration:
    FeriteVariable **ferite_create_parameter_list_from_data( FeriteScript *script, char *format, ... )
Description:
This function makes the whole process of creating a parameter list very easy. It allows you to create a list from the actual data and not have to worry about the finer details of ferite variables. It returns a parameter list.

e.g.:
ferite_create_parameter_list_from_data( script, "nns", 2.3, 2, "Jello" );

The formats are as follows:
n = number
s = string
o = object
a = array
Parameters:
    Parameter #1: script The - current script
    Parameter #2: format The - signiture for the parameters
Returns:
    The list that is created.

function ferite_call_function Click to go up to the list
This will call any function from it's function pointer and a parameter list
Declaration:
    FeriteVariable *ferite_call_function( FeriteScript *script, FeriteFunction *function, FeriteVariable **params )
Description:
This function will work on either an internal or native function and will happily choose the correct function if it happens to be overloaded.
Parameters:
    Parameter #1: FeriteScript *script - The current script
    Parameter #2: FeriteFunction *function - The function to be called
    Parameter #3: FeriteVariable **params - The parameter list to be passed to the function

Automatically generated at 8:45pm, Wednesday 08 January 2003 by feritedoc.