Objects and Classes

Declarations

class

Defines a class.

defclass

Defines a class and binds it to a global variable.

let-class

Defines a class and binds it to a local variable.

mixin

Defines a mixin.

defmixin

Defines a mixin and binds it to a global variable.

let-mixin

Defines a mixin and binds it to a local variable.

bind-classmacro!

Registers a classmacro.

defclassmacro

Shorthand for bind-classmacro!.

defstruct

Defines a struct.

Class Clauses

name

Defines the name of a class.

mixin

Applies mixins to a class definition.

field

Defines one or more fields.

const

Defines one or more associated constants.

met

Defines a method.

prop

Defines a property.

init

Defines an initializer method.

init-mixin

Defines a mixin initializer method.

fini

Defines a finalizer method.

fini-mixin

Defines a mixin finalizer method.

wrap

Wraps another method in the same class.

wrap-prop

Wraps another property in the same class.

state

Defines a class state.

state*

Defines a class state which is enabled by default.

fsm

Defines a set of mutually exclusive states.

init-state

Defines a state initializer method.

fini-state

Defines a state finalizer method.

Abbreviations

atsign

Accesses a method's self-object.

@self

Returns a reference to a method's self-object.

@class

Equivalent to (class-of @self).

@class-name

Equivalent to (class-name (class-of @self)).

@state-name

Returns the name of the enclosing state or state* form.

@field

Refers to a property's backing field.

@base

Invokes a wrapped method, returning its result.

@enab!

Equivalent to (enab! @self state-name ..args).

@enab?

Equivalent to (enab? @self state-name).

@disab!

Equivalent to (disab! @self state-name).

Functions

call-met

Invokes a method.

has-met?

Returns #t if the given name is bound to a method.

is?

Returns #t if an object or RData belongs to the specified class.

class-of

Returns the class of an object or RData.

class-name

Returns the name of a class.

class-has-mixin?

Returns #t if a class incorporates a particular mixin.

class-mixins

Returns all of a class' mixins.

mixin?

Returns #t if a class is a mixin.

enab!

Enables a state.

enab?

Returns #t if a state is currently enabled.

disab!

Disables a state.

has-state?

Returns #t if an object or class has a particular state.

obj-kill!

Permanently deactivates an object.

obj-killed?

Returns #t if an object has been killed.

Iterators
Miscellaneous