chiark / gitweb /
lib/keyword.c (kw_parseempty): Use correct variable scanning `kwval' list.
[sod] / src / class-make-proto.lisp
index a2783ee81d92085e17280086927ef848c5399b99..a978ca34a44b5440a263f7d3cdeee912d6f27ded 100644 (file)
@@ -86,7 +86,7 @@ (defgeneric make-sod-slot (class name type pset &key location)
 
 (export 'make-sod-instance-initializer)
 (defgeneric make-sod-instance-initializer
 
 (export 'make-sod-instance-initializer)
 (defgeneric make-sod-instance-initializer
-    (class nick name value pset &key location)
+    (class nick name value pset &key location inhibit-initargs add-to-class)
   (:documentation
    "Construct and attach an instance slot initializer, to CLASS.
 
   (:documentation
    "Construct and attach an instance slot initializer, to CLASS.
 
@@ -95,11 +95,17 @@ (defgeneric make-sod-instance-initializer
    construction process.  The default method looks up the slot using
    `find-instance-slot-by-name', calls `make-sod-initializer-using-slot' to
    actually make the initializer object, and adds it to the appropriate list
    construction process.  The default method looks up the slot using
    `find-instance-slot-by-name', calls `make-sod-initializer-using-slot' to
    actually make the initializer object, and adds it to the appropriate list
-   in CLASS."))
+   in CLASS unless ADD-TO-CLASS is nil.
+
+   Usually, if an `initarg' property is set on PSET, then a slot initarg is
+   created and attached to the slot; this can be prevented by setting
+   INHIBIT-INITARGS non-nil.  This is needed when creating a slot and
+   initializer from the same property set, in order to prevent creation of a
+   duplicate initarg."))
 
 (export 'make-sod-class-initializer)
 (defgeneric make-sod-class-initializer
 
 (export 'make-sod-class-initializer)
 (defgeneric make-sod-class-initializer
-    (class nick name value pset &key location)
+    (class nick name value pset &key location add-to-class)
   (:documentation
    "Construct and attach a class slot initializer, to CLASS.
 
   (:documentation
    "Construct and attach a class slot initializer, to CLASS.
 
@@ -108,7 +114,7 @@ (defgeneric make-sod-class-initializer
    construction process.  The default method looks up the slot using
    `find-class-slot-by-name', calls `make-sod-initializer-using-slot' to
    actually make the initializer object, and adds it to the appropriate list
    construction process.  The default method looks up the slot using
    `find-class-slot-by-name', calls `make-sod-initializer-using-slot' to
    actually make the initializer object, and adds it to the appropriate list
-   in CLASS."))
+   in CLASS unless ADD-TO-CLASS is nil."))
 
 (export 'make-sod-initializer-using-slot)
 (defgeneric make-sod-initializer-using-slot
 
 (export 'make-sod-initializer-using-slot)
 (defgeneric make-sod-initializer-using-slot
@@ -266,4 +272,16 @@ (defgeneric check-method-type (method message type)
    This is separated out of `shared-initialize', where it's called, so that
    it can be overridden conveniently by subclasses."))
 
    This is separated out of `shared-initialize', where it's called, so that
    it can be overridden conveniently by subclasses."))
 
+;;;--------------------------------------------------------------------------
+;;; Static instances.
+
+(export 'make-static-instance)
+(defgeneric make-static-instance (class name initializers pset location &key)
+  (:documentation
+   "Construct a new static instance of the given CLASS.
+
+   This is the main constructor functoin for static instances.  This is a
+   generic function so that the CLASS can construct static instances in a
+   special way."))
+
 ;;;----- That's all, folks --------------------------------------------------
 ;;;----- That's all, folks --------------------------------------------------