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:GetAttribute(any attribute
)
Returns any?
- required
attribute
: The attribute identifier to look up.
Returns the value of the given attribute for this class.
class public BaseClass:GetMember(any key
)
Returns any?
- required
key
: The key of the member to get.
Returns a defined member in the class, if it is set.
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.