factor/core/classes/mixin/mixin-docs.factor

32 lines
1.4 KiB
Factor
Raw Normal View History

2007-12-30 15:08:48 -05:00
USING: help.markup help.syntax help words definitions classes ;
2007-09-20 18:09:08 -04:00
IN: classes.mixin
ARTICLE: "mixins" "Mixin classes"
"An object is an instance of a union class if it is an instance of one of its members. In this respect, mixin classes are identical to union classes. However, new classes can be made into instances of a mixin class after the original definition of the mixin."
{ $subsection POSTPONE: MIXIN: }
{ $subsection POSTPONE: INSTANCE: }
{ $subsection define-mixin-class }
{ $subsection add-mixin-instance }
"The set of mixin classes is a class:"
{ $subsection mixin-class }
{ $subsection mixin-class? } ;
2007-12-30 15:08:48 -05:00
HELP: mixin-class
{ $class-description "The class of mixin classes." } ;
HELP: define-mixin-class
{ $values { "class" word } }
2007-12-30 16:09:21 -05:00
{ $description "Defines a mixin class. This is the run time equivalent of " { $link POSTPONE: MIXIN: } "." }
2007-12-30 15:08:48 -05:00
{ $notes "This word must be called from inside " { $link with-compilation-unit } "." }
{ $side-effects "class" } ;
HELP: add-mixin-instance
{ $values { "class" class } { "mixin" class } }
2007-12-30 16:09:21 -05:00
{ $description "Defines a class to be an instance of a mixin class. This is the run time equivalent of " { $link POSTPONE: INSTANCE: } "." }
2007-12-30 15:08:48 -05:00
{ $notes "This word must be called from inside " { $link with-compilation-unit } "." }
{ $side-effects "class" } ;
{ mixin-class define-mixin-class add-mixin-instance POSTPONE: MIXIN: POSTPONE: INSTANCE: } related-words
2007-09-20 18:09:08 -04:00
ABOUT: "mixins"