defobject

[Macro]
  (`defobject` name supers slots [(`:parameters` ...)])

Defines a new class of object. name is the name for the new class. supers a list of superclasses or `()`. slots is a list of slot specification or `()`. Each slot can be either the name of a slot or a list in the form:

> (slot `:initform` `:accessor` `:reader` `:writer` `:initarg`)

`defobject` automatically declares slot and adds its its keyword as an initialization argument for `new` and `make-instance`. Following slots comes an optional `:parameters` declaration:

> (`:parameters` ...)

Where the arguments following the `:parameters` keyword are the names of the slots that are instrument parameters. Slots listed are considered to be required parameters unless preceded by a lambda keyword `&optional`, `&key` or `&rest`. A required parameter means that an error is signaled if the slot is unbound during score generation. `&optional` parameters are ignored if unbound. `&key` parameters are also optional but the slot value is preceded by its keyword in the output file. A single `&rest` parameter is a list of values that are "spread" over a number of parameters in the output file.

#### See Also:

- `#i``` [Macro]
- `copy-object``` [Function]
- `new``` [Macro]