X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/7f2917d28642cfbdf590ff26f0cdd91a79b1c489..c34b237da0bb4bf08a3531a2e11442623df7e9d4:/src/class-layout-proto.lisp diff --git a/src/class-layout-proto.lisp b/src/class-layout-proto.lisp index bf3bfa4..927700f 100644 --- a/src/class-layout-proto.lisp +++ b/src/class-layout-proto.lisp @@ -7,7 +7,7 @@ ;;;----- Licensing notice --------------------------------------------------- ;;; -;;; This file is part of the Sensble Object Design, an object system for C. +;;; This file is part of the Sensible Object Design, an object system for C. ;;; ;;; SOD is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by @@ -31,10 +31,12 @@ (export '(effective-slot effective-slot-class effective-slot-direct-slot effective-slot-initializer)) (defclass effective-slot () - ((%class :initarg :class :type sod-slot :reader effective-slot-class) + ((%class :initarg :class :type sod-class :reader effective-slot-class) (slot :initarg :slot :type sod-slot :reader effective-slot-direct-slot) (initializer :initarg :initializer :type (or sod-initializer null) - :reader effective-slot-initializer)) + :reader effective-slot-initializer) + (initargs :initarg :initargs :initform nil + :type list :reader effective-slot-initargs)) (:documentation "Describes a slot and how it's meant to be initialized. @@ -50,6 +52,14 @@ (:documentation "Return the most specific initializer for SLOT, starting from CLASS.")) +(export 'find-slot-initargs) +(defgeneric find-slot-initargs (class slot) + (:documentation + "Return as a list all of the initargs defined on CLASS to initialize SLOT. + + The list is returned with initargs defined on more specific classes + first.")) + (export 'compute-effective-slot) (defgeneric compute-effective-slot (class slot) (:documentation