X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/a42893dda5f4dd2b89fbfe4e497da261159225ca..7b7947024fedb0bb7a0ea3ccb0029f6060de901b:/src/class-make-proto.lisp?ds=inline diff --git a/src/class-make-proto.lisp b/src/class-make-proto.lisp index f787bd3..d075304 100644 --- a/src/class-make-proto.lisp +++ b/src/class-make-proto.lisp @@ -124,6 +124,41 @@ (defgeneric make-sod-initializer-using-slot You are not expected to call this generic function directly; it's more useful as a place to hang methods for custom initializer classes.")) +(export 'make-sod-user-initarg) +(defgeneric make-sod-user-initarg + (class name type pset &optional default location) + (:documentation + "Attach a user-defined initialization keyword argument to the CLASS. + + The new argument has the given NAME and TYPE, and maybe a DEFAULT value. + Currently, initialization arguments are just dumb objects held in a + list.")) + +(export 'make-sod-slot-initarg) +(defgeneric make-sod-slot-initarg + (class name nick slot-name pset &optional location) + (:documentation + "Attach an initialization keyword argument to a slot by name. + + The default method uses `find-instance-slot-by-name' to find the slot, and + `make-slot-initarg-using-slot' to actually make and attach the initarg.")) + +(export 'make-sod-slot-initarg-using-slot) +(defgeneric make-sod-slot-initarg-using-slot + (class name slot pset &optional location) + (:documentation + "Attach an initialization keyword argument to a SLOT. + + The argument's type is taken from the slot type. Slot initargs can't have + defaults: the slot's most-specific initializer is used instead. + + You are not expected to call this generic function directly; it's more + useful as a place to hang methods for custom classes.")) + +(export 'sod-initarg-argument) +(defgeneric sod-initarg-argument (initarg) + (:documentation "Returns an `argument' object for the initarg.")) + (export 'make-sod-class-initfrag) (defgeneric make-sod-class-initfrag (class frag pset &optional location) (:documentation