Package inheriting-readers
Description
All symbols from this package should normally be explicitly qualified, such as inheriting-readers:standard-class
.
Don't (:use)
!
inheriting-readers
provides a simple yet powerful value inheritance scheme.
Sorry for the incomplete documentation. See note on Libraries page.
All symbols from this package should normally be explicitly qualified, such as inheriting-readers:standard-class
.
Don't (:use)
!
inheriting-readers:inheritance-schemes-mixin
, compatible-metaclasses:standard-class, compatible-metaclasses:standard-metaclass
TBW.
TBW.
inheriting-readers:inheritance-schemes-mixin
, inheriting-readers:inherit-class-option-mixin
, class-options:class-mixin, compatible-metaclasses:standard-class
Class options: (:inheritance-schemes t (:parent-function #'inheriting-readers:parent))
TBW.
(class inheriting-readers:standard-class
) slot-names &key inherit => slot-definition-class
If inherit is not nil
, return the class inheriting-readers:standard-direct-slot
, else call the next method.
(class inheriting-readers:standard-class
) (class inheriting-readers:direct-slot
) &key &allow-other-keys => reader-method-class
Returns the class inheriting-readers:standard-reader-method
.
c2mop:standard-direct-slot-definition
TBW.
inheriting-readers:inherit-mixin
, inheriting-readers:inheritance-scheme-mixin
, inheriting-readers:direct-slot
TBW.
(slot inheriting-readers:standard-direct-slot
) &key instance
TBW.
direct-slot &rest initargs &key &allow-other-keys => initargs-overrides
TBW.
(slot inheriting-readers:standard-direct-slot
) &key inherit inheritance-scheme => initargs-overrides
TBW.
Slots:
((inherit :initarg :inherit
:reader inheriting-readers:inherit
:initform nil))
object => inheritance-specification
Returns the inheritance-specification associated with the object.
inheriting-readers:inherit-mixin
, class-options:options-mixin, inheriting-readers:class
TBW.
(class inheriting-readers:inherit-class-option-mixin
) &key inherit direct-slots => canonicalized-options
TBW.
TBW.
inheriting-readers:reader-method
TBW.
(method inheriting-readers:standard-reader-method
) &rest initargs &key slot-definition
TBW.
class direct-slot inheritance-scheme method &rest initargs &key &allow-other-keys => initargs-overrides
inheriting-readers:inheritance-scheme
.TBW.
(class inheriting-readers:class
) (direct-slot c2mop:direct-slot-definition) (inheritance-scheme inheriting-readers:standard-inheritance-scheme
) (method inheriting-readers:reader-method
) &key => initargs-overrides
TBW.
TBW.
object => inheritance-scheme
Returns the inheritance-scheme associated with the object.
inheriting-readers:parent-function-mixin
, inheriting-readers:nil-is-valid-parent-p-mixin
, inheriting-readers:inheritance-scheme
TBW.
Slots:
((inherit :initarg :parent
:reader inheriting-readers:parent
:initform nil))
object => parent
Returns the object's parent.
An object could have multiple parents for various purposes, but this is a good default.
Slots:
((parent-function :initarg :parent-function
:reader inheriting-readers:parent-function
:type (or function symbol)
:initform #'inheriting-readers:parent))
(mixin inheriting-readers:parent-function-mixin
) slot-names &rest initargs &key parent-function => instance
TBW.
object => parent-function
Returns the parent-function to call to retrieve the parent.
Slots:
((nil-is-valid-parent-p :initarg :nil-is-valid-parent-p
:reader inheriting-readers:nil-is-valid-parent-p
:type boolean
:initform nil))
object => nil-is-valid-parent-p
Indicates whether or not nil
is a valid parent.
Slots:
((inheritance-scheme :initarg :inheritance-scheme
:reader inheriting-readers:inheritance-scheme
:type inheriting-readers:inheritance-scheme
))
class &rest initargs &key &allow-other-keys => inheritance-scheme-class
inheriting-readers:inheritance-scheme
.TBW.
(class cl:class
) &key => inheritance-scheme-class
Returns the class inheriting-readers:standard-inheritance-scheme
.
class inheritance-scheme-specification &key => inheritance-scheme
inheriting-readers:inheritance-scheme
.TBW.
class inheritance-scheme-specification &key (errorp t) => inheritance-scheme
Call the next method. Return its result if it's not nil
, else signal an error if errorp is true, else return nil
.
(class cl:class
) (inheritance-scheme-specification cons) &key => inheritance-scheme
Calls (apply #'make-instance (inheriting-readers:inheritance-scheme-class class) initargs)
.
object (inheritance-scheme inheriting-readers:inheritance-scheme
) &key => inheritance-scheme
Returns the supplied inheritance-scheme.
(mixin inheriting-readers:inheritance-schemes-mixin
) (object symbol) &key => inheritance-scheme
Returns the inheritance-scheme bound to name in (inheriting-readers:inheritance-schemes mixin)
, if there is one, else calls the next method.
(mixin inheriting-readers:standard-metaclass
) (name symbol) &rest rest => inheritance-scheme
Call the next method and return that result if it's not nil
.
Else, try to find the class named name, and if there is one then return the result of (apply #'inheriting-readers:resolve-inheritance-scheme class t :errorp nil rest)
, else return nil
.
(class inheriting-readers:class
) inheritance-scheme-specification &rest rest => inheritance-scheme
Call (apply #'inheriting-readers:resolve-inheritance-scheme (class-of class) inheritance-scheme-specification :errorp nil rest)
.
Slots:
((inheritance-schemes :reader inheriting-readers:inheritance-schemes
:initform nil))
(mixin inheriting-readers:inheritance-schemes-mixin
) &key inheritance-schemes
Sets the value of the inheritance-schemes slot to the value of (inheriting-readers:canonicalize-inheritance-schemes mixin inheritance-schemes)
.
(mixin inheriting-readers:inheritance-schemes-mixin
) &key inheritance-schemes
If inheritance-schemes was supplied, then set the value of the inheritance-schemes slot to nil
(to make sure previous local inheritance schemes don't participate in inheritance scheme resolution while canonicalizing inheritance schemes this time around) and execute the same code as the above method.
class => inheritance-schemes
Returns the local inheritance-schemes associated with the class.
class inheritance-scheme-specifications &key => canonicalized-inheritance-schemes
inheriting-readers:inheritance-scheme
.TBW.
(mixin inheriting-readers:inheritance-schemes-mixin
) (inheritance-scheme-specifications list) => canonicalized-inheritance-schemes
Returns a fresh plist in which each inheritance-scheme-specification in inheritance-scheme-specifications has been resolved to an inheriting-readers:inheritance-scheme
with (inheriting-readers:resolve-inheritance-scheme mixin inheritance-scheme-specification)
.