Class l2df.class
Basic class for OOP.
Info:
- Copyright: Atom-TM 2019
- Author: Abelidze
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:
- Class:new(...)
-
Constructor for creating a class instance.
Parameters:
- ... Arguments passed to Class:init() function.
Returns:
- Class:init()
- Class initialization.
- Class.isTypeOf(obj, cls)
-
Returns true if object and class have the same type. False otherwise.
Parameters:
- obj l2df.class Source object.
- cls l2df.class Source class.
Returns:
-
boolean
- Class.isInstanceOf(obj, cls)
-
Returns true if the object is an instance of the class. False otherwise.
Parameters:
- obj l2df.class Source object.
- cls l2df.class Source class.
Returns:
-
boolean
Fields
- l2df.class.super l2df.class
- Super-class metatable used for accessing parent class and calling its overloaded functions.