OOP.BaseClass

(in ./Carbon/OOP.lua)

Body for both OOP.Class and OOP.StaticClass base classes.


Methods

class public BaseClass:Attributes(dictionary attributes)

Returns self

  • required attributes: The attributes to give to the object.

Adds attributes to the class. Overwrites existing attributes. The attributes parameter is only shallow copied, keep this in mind.


class public BaseClass:Inherits(...)

Returns self

Inherits from classes, taking on their inheritable attributes, members, metatables, and type information.


class public BaseClass:Members(dictionary members)

Returns self

  • required members: The member to give to instances of this class.

Adds members to the class. Overwrites existing member entries. The members parameter is only shallow copied, keep this in mind.


class public BaseClass:Metatable(dictionary metatable)

Returns self

  • required metatable: The metatable to give to instances of this class.

Adds metatables to the class. Overwrites existing metatable entries. The metatable parameter is only shallow copied, keep this in mind.


Properties

public set Is

The typecheck object for this class.


private dictionary __attributes

Holds class attributes.


private dictionary __base_members

Holds base class members so they can be overridden effectively.


private dictionary __members

Holds user-defined class members.


private dictionary __metatable

Holds metatable to be applied to instances.