Handbook
Glossary
struct-class
Vocabulary
classes
.
struct
Class description
The metaclass of all
struct
classes.
Definition
USING:
classes
classes.tuple
kernel
;
IN:
classes.struct
PREDICATE:
struct-class
<
tuple-class
superclass-of
\
struct
eq?
;
Methods
USING:
classes.struct
kernel
;
M:
struct-class
boa
<struct-boa>
;
USING:
accessors
arrays
classes.struct
classes.tuple
effects
kernel
sequences
;
M:
struct-class
boa-effect
[
struct-slots
[
name>>
]
map
]
[
name>>
1array
]
bi
<effect>
;
USING:
classes.struct
classes.struct.private
classes.tuple.parser
combinators
kernel
sequences
;
M:
struct-class
boa>object
swap
pad-struct-slots
[
<struct>
]
[
struct-slots
]
bi
[
[
(writer-quot)
( value struct -- )
call-effect
]
with
2each
]
keepd
;
USING:
classes.struct
delegate.private
;
M:
struct-class
group-words
struct-slots
slot-group-words
;
USING:
classes.struct
slots
;
M:
struct-class
initial-value*
<struct>
t
;
inline
USING:
classes.struct
kernel
;
M:
struct-class
new
<struct>
;
USING:
accessors
arrays
classes.struct
classes.struct.private
kernel
sequences
slots
specialized-arrays
;
M:
struct-class
reader-quot
dup
type>>
array?
[
dup
type>>
first
define-array-vocab
drop
]
when
nip
[
read-struct-slot
]
curry
;
USING:
accessors
assocs
classes.private
classes.struct
classes.struct.private
combinators
generic
sequences
words
;
M:
struct-class
reset-class
{
[
\
<struct-boa>
def>>
first
delete-at
]
[
forget-struct-slot-accessors
]
[
forget-struct-slot-values-method
]
[
forget-clone-method
]
[
{
"c-type"
"layout"
"struct-size"
}
remove-word-props
]
[
M\
struct-class
reset-class
(call-next-method)
]
}
cleave
;
USING:
classes.struct
classes.struct.prettyprint.private
kernel
prettyprint.backend
prettyprint.sections
see.private
sequences
vocabs.prettyprint
;
M:
struct-class
see-class*
<colon
dup
struct-definer-word
pprint-word
dup
pprint-word
<block
struct-slots
[
pprint-struct-slot
]
each
block>
pprint-;
block>
;
USING:
classes.struct
classes.struct.private
kernel
slots
;
M:
struct-class
writer-quot
nip
[
write-struct-slot
]
curry
;