Class Instantiatable_class

Instantiatable_class.

The system for defining classes in 4dguns. Please note the capital "I", Ldoc converts it to a lowercase in all of this file

Tables

instantiatable_class.god_work Instantiatable_class

Methods

instantiatable_class:inherit (def) creates a new base class.
instantiatable_class:construct () construct every parent constructor is called in order of inheritance, this is used to make changes to the child table.
instantiatable_class:new () creates an instance of the base class.


Tables

instantiatable_class.god_work
Instantiatable_class

Fields:

  • instance defines wether the object is an instance
  • base_class only present for instances: the class from which this instance originates
  • parent_class the class from which this class was inherited from

Methods

instantiatable_class:inherit (def)
creates a new base class. Calls all constructors in the chain with def.instance=true

Parameters:

  • def the table containing a new definition (where the class calling the method is the parent). The content of the definition will override the fields for it's children.

Returns:

    def a new base class
instantiatable_class:construct ()
construct every parent constructor is called in order of inheritance, this is used to make changes to the child table. In self you will find base_class defining what class it is from, and the bool instance indicating (shocking) wether it is an instance.
instantiatable_class:new ()
creates an instance of the base class. Calls all constructors in the chain with def.instance=true

Returns:

    def a new instance of the class.
generated by LDoc 1.5.0 Last updated 2024-03-28 12:47:10