X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/a42893dda5f4dd2b89fbfe4e497da261159225ca..5fa27d76e1cdadec7e5e48f8e515a9673e894741:/src/classes.lisp diff --git a/src/classes.lisp b/src/classes.lisp index 0c695b2..9484141 100644 --- a/src/classes.lisp +++ b/src/classes.lisp @@ -71,6 +71,8 @@ :accessor sod-class-instance-initializers) (class-initializers :initarg :class-initializers :initform nil :type list :accessor sod-class-class-initializers) + (initargs :initarg :initargs :initform nil + :type list :accessor sod-class-initargs) (initfrags :initarg :initfrags :initform nil :type list :accessor sod-class-initfrags) (tearfrags :initarg :tearfrags :initform nil @@ -323,6 +325,28 @@ See `sod-initializer' for more details.")) +(export 'sod-initarg) +(defclass sod-initarg () + ((%class :initarg :class :type sod-class :reader sod-initarg-class) + (location :initarg :location :initform (file-location nil) + :type file-location :reader file-location) + (name :initarg :name :type string :reader sod-initarg-name) + (%type :initarg :type :type c-type :reader sod-initarg-type)) + (:documentation + "Describes a keyword argument accepted by the initialization function.")) + +(export 'sod-user-initarg) +(defclass sod-user-initarg (sod-initarg) + ((default :initarg :default :type t :reader sod-initarg-default)) + (:documentation + "Describes an initialization argument defined by the user.")) + +(export 'sod-slot-initarg) +(defclass sod-slot-initarg (sod-initarg) + ((slot :initarg :slot :type sod-slot :reader sod-initarg-slot)) + (:documentation + "Describes an initialization argument used to initialize a slot.")) + ;;;-------------------------------------------------------------------------- ;;; Messages and methods.