Class l2df.class

Last updated 2021-05-28 15:24:22

Basic class for OOP.

Info:

Functions

Class:extend(...) Method performing class inheritance.
Class:new(...) Constructor for creating a class instance.
Class:init() Class initialization.
Class.isTypeOf(obj, cls) Returns true if object and class have the same type.
Class.isInstanceOf(obj, cls) Returns true if the object is an instance of the class.

Fields

l2df.class.super Super-class metatable used for accessing parent class and calling its overloaded functions.


Functions

Methods
Class:extend(...)
Method performing class inheritance.

Parameters:

  • ... Params with callback functions and field-extending tables.

Returns:

    l2df.class
Class:new(...)
Constructor for creating a class instance.

Parameters:

Returns:

    l2df.class
Class:init()
Class initialization.
Class.isTypeOf(obj, cls)
Returns true if object and class have the same type. False otherwise.

Parameters:

Returns:

    boolean
Class.isInstanceOf(obj, cls)
Returns true if the object is an instance of the class. False otherwise.

Parameters:

Returns:

    boolean

Fields

l2df.class.super l2df.class
Super-class metatable used for accessing parent class and calling its overloaded functions.