define-vectored-struct ( T -- )


Vocabulary
classes.struct.vectored

Inputs
Tan object


Outputs
None

Definition


:: define-vectored-struct ( T -- )
T array-class-of :> T-array
[ "vectored-" write T present write ] with-string-writer
create-class-in :> vectored-T
[ "vectored-" write T present write "-element" write ]
with-string-writer create-class-in :> vectored-T-element
[ "<vectored-" write T present write ">" write ]
with-string-writer create-word-in :> <vectored-T>
[ "(vectored-" write T present write ")" write ]
with-string-writer create-word-in :> (vectored-T) vectored-T
tuple T struct-slots [ >vectored-slot ] map-index
define-tuple-class vectored-T-element tuple {
{ "(n)" fixnum read-only }
{ "(vectored)" vectored-T read-only }
} define-tuple-class* T struct-slots [
name>> [ reader-word ] [ writer-word ] bi
vectored-T-element define-vectored-accessors
] each
vectored-T-element \ vectored-element> create-method-in
dup \ method set
T{ fake-quotation { seq { T (vectored-element>) } } }
fake-quotations> first define* last-word make-inline
vectored-T \ nth-unsafe create-method-in dup \ method set
T{ fake-quotation { seq { vectored-T-element boa } } }
fake-quotations> first define* last-word make-inline
vectored-T \ length create-method-in dup \ method set
T{ fake-quotation { seq { T first-slot length } } }
fake-quotations> first define* last-word make-inline
vectored-T \ set-nth-unsafe create-method-in
dup \ method set
T{ fake-quotation { seq { T set-vectored-nth } } }
fake-quotations> first define* last-word make-inline
vectored-T \ sequence add-mixin-instance <vectored-T> T{
fake-quotation
{ seq { T <vectored-slots> vectored-T boa } }
} fake-quotations> first ( n -- vectored-T )
define-declared* last-word make-inline (vectored-T) T{
fake-quotation
{ seq { T (vectored-slots) vectored-T boa } }
} fake-quotations> first ( n -- vectored-T )
define-declared* ~26 more~ ;