roles vocabulary
Factor handbook ยป Vocabulary index


Documentation
Roles

Metadata
Authors:Joe Groff


Words

Tuple classes
ClassSuperclassSlots
multiple-inheritance-attempted tupleclasses
role-slot-overlap tupleclass slots


Predicate classes
ClassSuperclass
role mixin-class


Parsing words
WordSyntax
ROLE-TUPLE:ROLE-TUPLE: name slots ; ROLE-TUPLE: name < estate slots ; ROLE-TUPLE: name <{ estates... } slots... ;
ROLE:ROLE: name slots... ; ROLE: name < role slots... ; ROLE: name <{ roles... } slots... ;


Ordinary words
WordStack effect
(define-role)( class superroles slots -- )
add-to-roles( class roles -- )
check-for-slot-overlap( class roles-and-superclass slots -- )
define-role( class superroles slots -- )
define-tuple-class-with-roles( class roles-and-superclass slots -- )
multiple-inheritance-attempted( classes -- * )
parse-role-definition( -- class superroles slots )
role-or-tuple-slot-names( role-or-tuple -- names )
role-slot-overlap( class slots -- * )
role-slots( role -- slots )
roles>slots( roles-and-superclass slots -- superclass slots' )
slot-name( name/array -- name )
slot-names( array -- names )


Class predicate words
WordStack effect
multiple-inheritance-attempted?( object -- ? )
role-slot-overlap?( object -- ? )
role?( object -- ? )


Files


Metadata files