The Ferite Developers Guide - Extending and Embedding The Ferite Engine

Chris Ross

     chris@darkrock.co.uk

Eric Shorkey


This documentation is released under the same terms as the ferite library.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Table of Contents
1. Introduction
2. Creating Basic Modules
3. Creating Native Modules
Introduction
Builder
Ferite-C File Contents
module-header
module-init
module-deinit
module-register and module-unregister
Native Functions, the builder way
Classes and Namespaces
Finally
Without Builder
4. Accessing Ferite Internals
Introduction
The Memory Manager
Working With Variables
Accessing a Variable's Data
Changing a Variable's Type
Creating and Destroying Variables
Working With Namespaces
Working With Objects And Classes
Creating Classes
Creating Objects
Accessing Variables
Accessing Functions
Calling Functions
Namespace Functions
Object and Class Functions
Function Shortcuts
Raising Exceptions and Reporting Errors
Executing Code Snippets
5. Native Modules - By Hand
Functions
The Rest
6. Embedding Ferite
Getting The Engine Purring
Fake Native Modules
Cheating With Builder
7. Finally: Step By Step Examples
List of Tables
3-1. Parameter Types