License: Public Domain , Load it with Quicklisp: (ql:quickload "inheriting-readers")
Library type: Protocol , Project complexity: Medium

inheriting-readers provides a simple yet powerful value inheritance scheme.

Overview

Sorry for the incomplete documentation. See note on Libraries page.

Dictionary

Dictionary » inheriting-readers

Package inheriting-readers

Description

All symbols from this package should normally be explicitly qualified, such as inheriting-readers:standard-class.
Don't (:use)!

Dictionary » Classes

Dictionary » Classes » standard-metaclass

Dictionary » Classes » class

Dictionary » Classes » standard-class

Dictionary » Classes » direct-slot

Dictionary » Classes » standard-direct-slot

Dictionary » Classes » expand-inherit-slot-option

Generic Function inheriting-readers:expand-inherit-slot-option

direct-slot &rest initargs &key &allow-other-keys => initargs-overrides

Arguments and Values

  • direct-slot -- A direct slot.
  • initargs -- A plist.
  • initargs-overrides -- A fresh plist.

Description

TBW.

Methods

Dictionary » Classes » inherit-mixin

Class inheriting-readers:inherit-mixin

Description

Slots:

((inherit :initarg :inherit
          :reader inheriting-readers:inherit
          :initform nil))

Dictionary » Classes » inherit

Generic Function inheriting-readers:inherit

object => inheritance-specification

Description

Returns the inheritance-specification associated with the object.

Dictionary » Classes » inherit-class-option-mixin

Dictionary » Classes » reader-method

Dictionary » Classes » standard-reader-method

Dictionary » Classes » compute-inheriting-method-initargs-overrides

Generic Function inheriting-readers:compute-inheriting-method-initargs-overrides

class direct-slot inheritance-scheme method &rest initargs &key &allow-other-keys => initargs-overrides

Arguments and Values

  • class -- A class.
  • direct-slot -- A direct slot.
  • inheritance-scheme -- An inheriting-readers:inheritance-scheme.
  • method -- A method.
  • initargs -- A plist.
  • initargs-overrides -- A fresh plist.

Description

TBW.

Methods

Dictionary » Inheritance schemes

Dictionary » Inheritance schemes » inheritance-scheme

Class inheriting-readers:inheritance-scheme

Description

TBW.

Generic Function inheriting-readers:inheritance-scheme

object => inheritance-scheme

Description

Returns the inheritance-scheme associated with the object.

Dictionary » Inheritance schemes » standard-inheritance-scheme

Dictionary » Inheritance schemes » parent-mixin

Class inheriting-readers:parent-mixin

Description

Slots:

((inherit :initarg :parent
          :reader inheriting-readers:parent
          :initform nil))

Dictionary » Inheritance schemes » parent

Generic Function inheriting-readers:parent

object => parent

Description

Returns the object's parent.

An object could have multiple parents for various purposes, but this is a good default.

Dictionary » Inheritance schemes » parent-function-mixin

Class inheriting-readers:parent-function-mixin

Description

Slots:

((parent-function :initarg :parent-function
                  :reader inheriting-readers:parent-function
                  :type (or function symbol)
                  :initform #'inheriting-readers:parent))

Dictionary » Inheritance schemes » parent-function

Generic Function inheriting-readers:parent-function

object => parent-function

Description

Returns the parent-function to call to retrieve the parent.

Dictionary » Inheritance schemes » nil-is-valid-parent-p-mixin

Class inheriting-readers:nil-is-valid-parent-p-mixin

Description

Slots:

((nil-is-valid-parent-p :initarg :nil-is-valid-parent-p
                        :reader inheriting-readers:nil-is-valid-parent-p
                        :type boolean
                        :initform nil))

Dictionary » Inheritance schemes » nil-is-valid-parent-p

Generic Function inheriting-readers:nil-is-valid-parent-p

object => nil-is-valid-parent-p

Description

Indicates whether or not nil is a valid parent.

Dictionary » Inheritance schemes » inheritance-scheme-mixin

Dictionary » Inheritance schemes » inheritance-scheme-class

Generic Function inheriting-readers:inheritance-scheme-class

class &rest initargs &key &allow-other-keys => inheritance-scheme-class

Arguments and Values

Description

TBW.

Methods

Dictionary » Inheritance schemes » resolve-inheritance-scheme

Generic Function inheriting-readers:resolve-inheritance-scheme

class inheritance-scheme-specification &key => inheritance-scheme

Arguments and Values

Description

TBW.

Methods

Around-Method inheriting-readers:resolve-inheritance-scheme

class inheritance-scheme-specification &key (errorp t) => inheritance-scheme

Description

Call the next method. Return its result if it's not nil, else signal an error if errorp is true, else return nil.

Method inheriting-readers:resolve-inheritance-scheme

(class cl:class) (inheritance-scheme-specification cons) &key => inheritance-scheme

Description

Calls (apply #'make-instance (inheriting-readers:inheritance-scheme-class class) initargs).

Method inheriting-readers:resolve-inheritance-scheme

object (inheritance-scheme inheriting-readers:inheritance-scheme) &key => inheritance-scheme

Description

Returns the supplied inheritance-scheme.

Method inheriting-readers:resolve-inheritance-scheme

(mixin inheriting-readers:inheritance-schemes-mixin) (object symbol) &key => inheritance-scheme

Description

Returns the inheritance-scheme bound to name in (inheriting-readers:inheritance-schemes mixin), if there is one, else calls the next method.

Method inheriting-readers:resolve-inheritance-scheme

(mixin inheriting-readers:standard-metaclass) (name symbol) &rest rest => inheritance-scheme

Description

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.

Method inheriting-readers:resolve-inheritance-scheme

(class inheriting-readers:class) inheritance-scheme-specification &rest rest => inheritance-scheme

Description

Call (apply #'inheriting-readers:resolve-inheritance-scheme (class-of class) inheritance-scheme-specification :errorp nil rest).

Dictionary » Inheritance schemes » inheritance-schemes-mixin

Before-Method initialize-instance

(mixin inheriting-readers:inheritance-schemes-mixin) &key inheritance-schemes

Description

Sets the value of the inheritance-schemes slot to the value of (inheriting-readers:canonicalize-inheritance-schemes mixin inheritance-schemes).

Before-Method reinitialize-instance

(mixin inheriting-readers:inheritance-schemes-mixin) &key inheritance-schemes

Description

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.

Dictionary » Inheritance schemes » inheritance-schemes

Generic Function inheriting-readers:inheritance-schemes

class => inheritance-schemes

Description

Returns the local inheritance-schemes associated with the class.

Dictionary » Inheritance schemes » canonicalize-inheritance-schemes

Generic Function inheriting-readers:canonicalize-inheritance-schemes

class inheritance-scheme-specifications &key => canonicalized-inheritance-schemes

Arguments and Values

  • class -- A class.
  • inheritance-scheme-specifications -- A plist. Each entry associates a name to an inheritance scheme specification.
  • canonicalized-inheritance-schemes -- A plist. Each entry associates a name to an inheriting-readers:inheritance-scheme.

Description

TBW.

Methods

Method inheriting-readers:canonicalize-inheritance-schemes

(mixin inheriting-readers:inheritance-schemes-mixin) (inheritance-scheme-specifications list) => canonicalized-inheritance-schemes

Description

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).