group General

Description

These are general functions that are critical to the operation of ferite within another application. This includes the initialisation and deinitialisation of the ferite engine aswell as tools to extract the data of parameter lists.

group attributes
function ferite_init() - First call to the ferite engine to initialise it
function ferite_deinit() - Shuts the ferite engine down, clears the garbage collector and frees up unused memory
function ferite_get_parameters() - Get the ferite variables from a list and put them into pointers to real c variables
function ferite_get_parameter_count() - Returns the number of paramters within a list
function ferite_get_required_parameter_list_size() -
function ferite_get_parameter() - Get the nth parameter from the parameter list
function ferite_set_script_argc() - Set the argv array that scripts can access

Functions

function ferite_init Click to go up to the list
First call to the ferite engine to initialise it
Declaration:
    int ferite_init( int argc, char **argv )
Description:
This must be called to allow the engine to work. Without it, things go really rather wrong. You can pass arguments into the scripts and control the engine.

--fe-use-classic - this will tell ferite to use malloc/free rather than the jedi memory manager
--fe-debug - tell ferite to dump debug out to stdout, warning: this will produce a lot of output, ferite also has to be compiled with debugging support.
--fe-show-mem-use - tell ferite to dump to stdout a set of memory statistics, this is usefull for checking leaks
--fe-use-mm-with-pcre - tell ferite to be the default allocator for the regex engine

This function can be called multiple times without fear - it will only set things up if they are needed.
Parameters:
    Parameter #1: int argc - Number of arguments
    Parameter #2: char **argc - Standard array of pointers
Returns:
    1 is if initialised.

function ferite_deinit Click to go up to the list
Shuts the ferite engine down, clears the garbage collector and frees up unused memory
Declaration:
    int ferite_deinit()
Description:
Use this when the engine is no longer needed.

function ferite_get_parameters Click to go up to the list
Get the ferite variables from a list and put them into pointers to real c variables
Declaration:
    int ferite_get_parameters( FeriteVariable **list, int num_args, ... )
Description:
This method is very useful for translation from the internal variable format to a standard c variable.
Parameters:
    Parameter #1: FeriteVariable **list - The list of variables passed to the function calling this method
    Parameter #2: int num_args - The number of arguments you wish to extract from the list
    Parameter #3: ... Pointers - to the real c variables

function ferite_get_parameter_count Click to go up to the list
Returns the number of paramters within a list
Declaration:
    int ferite_get_parameter_count( FeriteVariable **list )
Description:
This method is useful for obtaining the number of variables passed to the function. It is suggested that this method is used rather than any other as it will allow for underneath changes without breaking existing code.
Parameters:
    Parameter #1: FeriteVariable **list - The list of variables passed to the function calling this method

function ferite_get_required_parameter_list_size Click to go up to the list

function ferite_get_parameter Click to go up to the list
Get the nth parameter from the parameter list
Declaration:
    void *ferite_get_parameter( FeriteVariable **list, int num )
Parameters:
    Parameter #1: FeriteVariable **list - The list
    Parameter #2: int num - The variable to get

function ferite_set_script_argc Click to go up to the list
Set the argv array that scripts can access
Declaration:
    void ferite_set_script_argv( int argc, char **argv )
Description:
The 'argv' array within scripts is used to pass values from outside thee script to the inside - much like the way arguments are passed to a c program.
Parameters:
    Parameter #1: int argc - The number of arguments
    Parameter #2: char **argv - The arguments

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