Objects
Last updated
Last updated
OneScript supports the idea of modular development and reusable code. In order to achieve this all source code is compiled into objects that can ultimately be linked together into a OneScript executable image.
Objects are produced in a binary format that need to linked together for final execution by the OneScript Runtime.
An object is made up of the following basic data structures:
Name
Type
Description
byte
byte
An 8 bit unsigned value
integer
32 bytes
A 32 byte unsigned value
string
string
An integer followed by a byte array defining a Unicode string value,
date
date
byte array
byte array
By following these basic data structures for all objects it is possible to transfer objects to any platform capable of running OneScript stuff!!!
Every object the Linker handles follows a standard structure in JSON that is similar to a . An object is declared as a module that contains the following:
Name
Type
Description
Name
string
Name of the object
Location
string
The physical location of the object.
Entry Point
integer
For an object that can be started up
Entry Call Count
integer
Using List
Using List
A collections of using statements
Classes
Classes
A collections of classes
The basic information tells the Linker how to deal with the object. It includes the following information:
Name
Type
Description
Name
string
Location
string
File specification of the location of the source code.
Entry Point
The using list is list of references to other objects that must be available in the reference folder or specified in the command line of the Linker process.
A list of classes that make up the object. Each list must contain the following information:
Name
Fields
Methods