(goops.info.gz) Basic Instance Creation
Info Catalog
(goops.info.gz) Creating Instances
(goops.info.gz) Customizing Instance Creation
Basic Instance Creation
-----------------------
To create a new instance of any GOOPS class, use the generic function
`make' or `make-instance', passing the required class and any
appropriate instance initialization arguments as keyword and value
pairs. Note that `make' and `make-instances' are aliases for each
other - their behaviour is identical.
- generic: make
- method: make (class <class>) . initargs
Create and return a new instance of class CLASS, initialized using
INITARGS.
In theory, INITARGS can have any structure that is understood by
whatever methods get applied when the `initialize' generic function
is applied to the newly allocated instance.
In practice, specialized `initialize' methods would normally call
`(next-method)', and so eventually the standard GOOPS `initialize'
methods are applied. These methods expect INITARGS to be a list
with an even number of elements, where even-numbered elements
(counting from zero) are keywords and odd-numbered elements are
the corresponding values.
GOOPS processes initialization argument keywords automatically for
slots whose definition includes the `#:init-keyword' option (
init-keyword Slot Options.). Other keyword value pairs can only
be processed by an `initialize' method that is specialized for the
new instance's class. Any unprocessed keyword value pairs are
ignored.
- generic: make-instance
- method: make-instance (class <class>) . initargs
`make-instance' is an alias for `make'.
Info Catalog
(goops.info.gz) Creating Instances
(goops.info.gz) Customizing Instance Creation
automatically generated byinfo2html