When assigning types to objects, the following qualifiers can be used.
Qualifier | Description |
---|---|
owned | Owned reference |
unowned | Unowned reference |
const | Const reference |
When defining variables and fields, the following qualifiers can be used.
Qualifier | Description |
---|---|
static | Permanent (not destroyed before program exit) |
public | Public access (available from anywhere) |
private | Private access (available only in enclosing module or class) |
protected | Protected access (available to subclasses of enclosing class) |
extern | Defined by a module written in another language |
__super | Custom reference to superclass instance |
__vtable | Custom reference to vtable |
When defining classes and structs, the following qualifiers can be used.
Qualifier | Description |
---|---|
transparent | Transparent class/struct |
static | Inner class is independent of outer class |
abstract | Class can not be instantiated (must be subclassed) |
final | Class can not be subclassed |
sealed | Class can not be subclassed by any other module |
public | Public access (available from anywhere) |
private | Private access (available only in enclosing module or class) |
protected | Protected access (available to subclasses of enclosing class) |
__rtinit | Custom vtable to be allocated at runtime |
When defining functions and methods, the following qualifiers can be used.
Qualifier | Description |
---|---|
transparent | Transparent function/method |
static | Method is independent of class instance |
virtual | Method is polymorphic |
abstract | Method must be overridden by subclasses |
final | Method can not be overridden |
override | Method is an override |
public | Public access (available from anywhere) |
private | Private access (available only in enclosing module or class) |
protected | Protected access (available to subclasses of enclosing class) |
extern | Defined by a module written in another language |
meta | Metamethod |
When declaring function parameters, the following qualifiers can be used.
Qualifier | Description |
---|---|
ref | In/out-parameter (pass by reference) |
out | Out-parameter (pass by reference) |
implicit | Implicit parameter |
__c_printf | C printf-style format |
__c_throw_arg | Implicit parameter for exception passing |