License: Public Domain , Load it with Quicklisp: (ql:quickload "cesdi")
Library type: API design enhancement , Project complexity: Simple

cesdi provides a compute-effective-slot-definition-initargs generic function
that allows for more ergonomic initialization of effective slot definition objects.

Dictionary

Dictionary » cesdi

Dictionary » cesdi-mixin

Class cesdi:cesdi-mixin

c2mop:standard-class

Description

Classes that inherit from this class participate in the cesdi protocol.

Method c2mop:compute-effective-slot-definition

(class cesdi:cesdi-mixin) name direct-slot-definitions => effective-slot-definition

Description

This method is at the core of cesdi. It effectively translates from the old, awkward protocol to the new, ergonomic protocol.

This method first calls cesdi:compute-effective-slot-definition-initargs to compute the initargs.
It then calls cesdi:effective-slot-definition-class with the class and initargs to get the effective-slot-definition-class.
It then calls the next method to instantiate the effective-slot-definition, arranging for c2mop:effective-slot-definition-class to receive the effective-slot-definition-class through an internal special variable.
It then amends the effective-slot-definition to reflect the initargs, then returns effective-slot-definition.

Dictionary » compute-effective-slot-definition-initargs

Generic Function cesdi:compute-effective-slot-definition-initargs

class direct-slot-definitions => initargs

Arguments and Values

  • class -- A class.
  • direct-slot-definitions -- A list.
  • initargs -- A list of initialization arguments and values.

Description

Computes the initargs which will be (conceptually) passed to make-instance to construct the effective slot definition object.

Each of this generic function's primary and around methods, when they return an initargs result, must do so by calling the next method and returning that value, optionally preceded by additional initargs that either introduce additional values or override existing values. These methods can inspect the partial initargs list returned by the next method, but must ignore any arguments they don't recognize.

Methods

Dictionary » effective-slot-definition-class

Generic Function cesdi:effective-slot-definition-class

class &rest initargs &key &allow-other-keys => slot-definition-class

Arguments and Values

  • class -- A class.
  • initargs -- A list of initialization arguments and values.
  • slot-definition-class -- A class metaobject which is a subclass of the class c2mop:effective-slot-definition.

Description

This generic function is the cesdi counterpart to c2mop:effective-slot-definition-class.

The initargs it receives is the full list of initargs as computed by cesdi:compute-effective-slot-definition-initargs.
This is in contrast to c2mop:effective-slot-definition-class, which receives only the standard initargs.

Methods