Fetching contributors…
Cannot retrieve contributors at this time
103 lines (94 sloc) 3.52 KB
% Copyright (C) 2008, 2009, 2010, 2012, 2014 Bert Burgemeister
% Permission is granted to copy, distribute and/or modify this
% document under the terms of the GNU Free Documentation License,
% Version 1.2; with no Invariant Sections, no Front-Cover Texts and
% no Back-Cover Texts. For details see file COPYING.
(\kwd{:conc-name } \Op{\NEV{\VAR{slot-prefix}}\DF{\VAR{foo}\LIT{-}}})}{.}\\
(\kwd{:constructor }
\OP{\NEV{\VAR{maker}}\DF{\LIT{MAKE-}\VAR{foo}}\text{ }
(\kwd{:copier }
(\kwd{:include\hspace{.5ex}} \NEV{\VAR{struct}}% disabled to save space %\text{ }
(\NEV{\VAR{slot}}\text{\hspace{.5ex}} \Op{\VAR{init}% disabled to save space %\text{ }
\kwd{:type\hspace{.5ex}} \NEV{\VAR{sl-type}}\\
\kwd{:read-only } \NEV{\VAR{b}}}{\}}})\\
(\kwd{:type } \xorGOO{\kwd{list}\\
(\kwd{vector }\NEV{\VAR{type}})}{\}})\text{ }
(\kwd{:initial-offset } \NEV{\VAR{n}})\\
(\kwd{:print-object } \Op{\NEV{\VAR{o-printer}}})\\
(\kwd{:print-function } \Op{\NEV{\VAR{f-printer}}})
(\kwd{:predicate } \Op{\NEV{\VAR{p-name}}\DF{\VAR{foo}\LIT{-P}}})}{.}
(\VAR{slot } \Op{\VAR{init}\text{ }
\kwd{:type } \NEV{\VAR{slot-type}}\\
\kwd{:read-only } \NEV{\VAR{bool}}
Define structure \retval{\VAR{foo}} together with functions
\LIT{MAKE-}\VAR{foo}, \LIT{COPY-}\VAR{foo} and
\VAR{foo}\LIT{-P}; and \kwd{setf}able accessors
\VAR{foo}\LIT{-}\VAR{slot}. Instances are of class \VAR{foo} or, if
\kwd{defstruct} option \kwd{:type} is given, of the specified type.
They can be
created by (\LIT{MAKE-}\VAR{foo} \Goos{\kwd{:}\VAR{slot}
\VAR{value}}) or, if \VAR{ord-$\lambda$} (see
page \pageref{section:Functions}) is given, by (\VAR{maker}
\OPn{\VAR{arg}} \Goos{\kwd{:}\VAR{key} \VAR{value}}). In the latter
case, \VAR{arg}s and \kwd{:}\VAR{key}s correspond to the positional
and keyword parameters defined in \VAR{ord-$\lambda$} whose
\VAR{var}s in turn correspond to \VAR{slot}s.
\kwd{:print-object}/\kwd{:print-function} generate a
\GFU{print-object} method for an instance \VAR{bar} of \VAR{foo}
calling (\VAR{o-printer} \VAR{bar} \VAR{stream}) or (\VAR{f-printer}
\VAR{bar} \VAR{stream} \VAR{print-level}), respectively.
If \kwd{:type} without \kwd{:named} is given, no \VAR{foo}\LIT{-P}
is created.
\IT{(\FU*{COPY-STRUCTURE} \VAR{structure})}
Return \retval{copy of \VAR{structure}} with shared slot values.
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "clqr"
%%% End: