Class
A class
object created from the class()
function. Contains all of the members given from the classData
.
Summary
Properties
An unique identifier of the class
.
A table that contains classes that the class
inherits from.
A table that contains functions or classes that can access Private
and Protected
members of the class
.
A table that contains the static members of the class
. These members can only be called through the class
object.
Methods
Returns a new object
that contains all of the members given from the class
.
extends (className: string) : (classData: classData) : class
Creates a new class
that inherits the class
it's been created from. Contains all Public
and Protected
members of that base class
.
overload (accessSpecifier: string, name: string, functionTable: {(...any) -> (any)}) : void
Creates an overloaded function with the given access specifier, name and the function table, and saves it to the class
's classData
.
static (accessSpecifier: string, name: string, property: any) : void
Creates a new static class
member that can only be accessable through the class
object.
Properties
Name
This is an unique identifier of the class
. Using the getClass()
function with this property will retrieve the desired class
. Since names are unique, for every class, you have to use a different name.
Inherits
This table contains all the classes that the class
is inheriting from. Currently, multiple class inheritance is not supported, so a class
can only inherit from one class
, but it may be different in the future.
Friends
This table contains all the functions and the classes that can access all of the Public
and Protected
members of the class
.
Statics
This table contains all the members that are static, meaning they only belong to the class
. These members won't replicate to the objects, and can only be called through the class
object.
Methods
new
Creates and returns a new object
that contains all of the members given from the class
.
Returns
object |
extends
Creates and returns a new class
that inherits the class
it's been created from. Contains all the Public
and Protected
members of that base class
.
Parameters
Returns
class |
overload
Creates an overloaded function with the given parameters, and saves it to the class
's classData
table.
Parameters
Returns
void |
static
Creates a new static member with the given parameters, and saves it to the class
's Statics
table. These members do not replicate to the objects, as they belong to the class
.