Handbook
Glossary
add-mixin-instance ( class mixin -- )
Factor handbook
»
The language
»
Objects
»
Classes
»
Mixin classes
Prev:
define-mixin-class ( class -- )
Next:
mixin-class
Vocabulary
classes
.
mixin
Inputs
class
a
class
mixin
a
class
Outputs
None
Word description
Defines a class to be an instance of a mixin class. This is the run time equivalent of
INSTANCE:
.
Notes
This word must be called from inside
with-compilation-unit
.
Side effects
Modifies
class
See also
mixin-class
,
define-mixin-class
,
MIXIN:
,
INSTANCE:
Definition
USING:
classes.mixin.private
kernel
;
IN:
classes.mixin
:
add-mixin-instance
( class mixin -- )
check-types
[
2drop
]
[
(add-mixin-instance)
]
if-mixin-member?
;