chiark / gitweb /
src/module-parse.lisp: Improve error recovery for core class items.
[sod] / src / class-layout-proto.lisp
index 684fb3213bc32a4b285c01064033ca3fa9a1c0d8..927700f24b71075664af2ee8b3d424e86260da8a 100644 (file)
@@ -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 @@ (cl:in-package #:sod)
 (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 @@ (defgeneric find-slot-initializer (class slot)
   (: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
@@ -151,6 +161,8 @@ (defgeneric compute-ilayout (class)
 
 ;;; vtmsgs
 
+(export '(vtmsgs vtmsgs-class vtmsgs-subclass
+         vtmsgs-chain-head vtmsgs-chain-tail vtmsgs-entries))
 (defclass vtmsgs ()
   ((%class :initarg :class :type sod-class :reader vtmsgs-class)
    (subclass :initarg :subclass :type sod-class :reader vtmsgs-subclass)