Menu

Wrapper Structure

Don Duvall

Lua4Pas Wrapper Structure Overview

Below is an overview of the planned structure that Lua will be accessed and used in. Please keep in mind that this project is still in the planning phase and actual changes may not be made back to this document until they are stable.


TL4PInstance

In lua the lua_State is the pointer to the lua instance (VM). The concept here is to abstract it into an Object containing and managing the lua_State for the developer. (The developer will not be given access to the lua_State* all access to it is managed from the wrapper)

TL4PInstance automatically registers and opens the lua_State* for the developer, along with handling the stack (in the future). It contains methods registerFunction and registerMethod to register functions of the correct prototype to be accessed by lua scripts.

The TL4PInstance.registerFunction and TL4PInstance.registerMethod Register the code to global functions in the lua_State*. In the future it will be possible to register code to a TL4PTable object.


Related

Wiki: Lua4Pas Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.