group Modules

Description

This set of functions are useful for module writers.

group attributes
function ferite_load_module() - Load a module (script or native)
function ferite_add_library_search_path() - Add a path to the list of paths that ferite searches for scripts
function ferite_set_library_native_path() - Set the path where ferite looks for the native libraries to load
function ferite_module_register_fake_module() - Register a fake native module.
function ferite_module_add_preload() - Add a module to the list of libraries that are loaded when a script is compiled
function ferite_module_do_preload() - Preload the modules into the script

Functions

function ferite_load_module Click to go up to the list
Load a module (script or native)
Declaration:
    int ferite_load_module( FeriteScript *script, FeriteNamespace *ns, char *name )
Parameters:
    Parameter #1: FeriteScript *script - The script to load the module into
    Parameter #2: FeriteNamespace *ns - The namespace in which the module will be loaded
    Parameter #3: char *name - The name of the module
Returns:
    0 on fail, otherwise greater than 0 for sucess

function ferite_add_library_search_path Click to go up to the list
Add a path to the list of paths that ferite searches for scripts
Declaration:
    void ferite_add_library_search_path( char *path )
Parameters:
    Parameter #1: char *path - The path to add

function ferite_set_library_native_path Click to go up to the list
Set the path where ferite looks for the native libraries to load
Declaration:
    void ferite_set_library_native_path( char *path )
Parameters:
    Parameter #1: char *path - The path where they libraries are located

function ferite_module_register_fake_module Click to go up to the list
Register a fake native module.
Declaration:
    void ferite_module_register_fake_module( char *name, void *_register, void *_unregister, void *_init, void *_deinit )
Description:
This function is used to register fake modules from an application. This allows you to to setup a module to be loaded from an application. Combined with ferite_module_do_preload this will provide a method of exporting api to scripts using standard module methods.
Parameters:
    Parameter #1: char *name - The name of the module. Even though this is a fake module it must be post fixed with the ".lib" extension.
    Parameter #2: void *_register - A pointer to the register function - can be NULL
    Parameter #3: void *_unregister - A pointer to the unregister function - can be NULL
    Parameter #4: void *_init - A pointer to the init function - must not be NULL
    Parameter #5: void *_deinit - A pointer to the deinit function - must not be NULL

function ferite_module_add_preload Click to go up to the list
Add a module to the list of libraries that are loaded when a script is compiled
Declaration:
    void ferite_module_add_preload( char *name )
Parameters:
    Parameter #1: char *name - The name of the module

function ferite_module_do_preload Click to go up to the list
Preload the modules into the script
Declaration:
    int ferite_module_do_preload( FeriteScript *script )
Parameters:
    Parameter #1: FeriteScript *script - The script to load into

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