The dynamic-mixins Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The dynamic-mixins Reference Manual

This is the dynamic-mixins Reference Manual, version 0.0, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:50:18 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

dynamic-mixins

Dynamic-mixins is for simple, dynamic class combination:

(in-package :dynamic-mixins)

(defclass a () ())
(defclass b () ())
(defclass c () ())

(make-instance (mix 'a 'b)) ;; => #<MIXIN-OBJECT (A B)>

(let ((a (make-instance 'a)))
  (ensure-mix a 'b 'c)      ;; => #<MIXIN-OBJECT (B C A)>
  (delete-from-mix a 'a)    ;; => #<MIXIN-OBJECT (B C)>
  (delete-from-mix a 'c))   ;; => #<B>

This allows objects to be mixed and updated without manually defining many permutations.

Dictionary

Notes

Order and Precedence

Order matters; you are defining a new class which has the specified classes as direct superclasses.

ENSURE-MIX prepends classes in the order specified. (Originally, it appended classes.) This is simply more useful in practice:

(defclass general-object () ())
(defclass specializing-mixin () ())

(defgeneric some-operation (x))

(defmethod some-operation (x)
   "Handle the general case"
   ...)

(defmethod some-operation ((x specializing-mixin))
   "Handle the case for SPECIALIZING-MIXIN"
   ...)

(let ((x (make-instance 'general-object)))
  (ensure-mix x 'specializing-mixin)
  (some-operation x))

If SPECIALIZING-MIXIN were appended, the method which specialized on it would never be called. In practice, this defeats the point. Therefore, mixins now get precedence.

Errors

Errors regarding precendence and circularity are now handled, or rather, causing such an error will not produce a nearly-unrecoverable situation. Now you will just get an error.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 dynamic-mixins

Author

Ryan Pavlik

License

BSD-2-Clause

Description

Simple dynamic class mixing without manual permutations

Version

0.0

Dependencies
Source

dynamic-mixins.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 dynamic-mixins.asd

Location

/home/quickbuilder/quicklisp/dists/quicklisp/software/dynamic-mixins-20141106-git/dynamic-mixins.asd

Systems

dynamic-mixins (system)

Packages

dynamic-mixins.asdf


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 dynamic-mixins/package.lisp

Parent

dynamic-mixins (system)

Location

package.lisp

Packages

dynamic-mixins


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 dynamic-mixins/dynamic-mixins.lisp

Dependency

package.lisp (file)

Parent

dynamic-mixins (system)

Location

dynamic-mixins.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 dynamic-mixins.asdf

Source

/home/quickbuilder/quicklisp/dists/quicklisp/software/dynamic-mixins-20141106-git/dynamic-mixins.asd

Use List

Previous: , Up: Packages   [Contents][Index]

4.2 dynamic-mixins

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: delete-from-mix OBJECT &rest CLASSES
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)

Function: ensure-mix OBJECT &rest CLASSES
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)

Function: mix &rest CLASSES
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Classes

Class: mixin-class ()
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)

Direct superclasses

standard-class (class)

Direct methods
  • print-object (method)
  • validate-superclass (method)
Direct slots
Slot: classes
Initargs

:classes

Class: mixin-object ()
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)

Direct superclasses

standard-object (class)

Direct methods

print-object (method)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *dynamic-mix-classes*
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: %find-class NAME-OR-CLASS
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)

Function: %mix OBJECT-OR-CLASS &rest CLASS-LIST

Create a MIX-LIST for MAKE-INSTANCE. The first element may be an instance; further elements must be class names or classes.

Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)

Function: copy-mix-list INSTANCE
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)

Function: define-mixin MIX-LIST
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)

Function: ensure-mixin MIX-LIST
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)

Function: make-mix-list &key (LIST LIST)
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)

Function: mix-list-list INSTANCE
Function: (setf mix-list-list) VALUE INSTANCE
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)

Function: mix-list-p OBJECT
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)

Function: set-superclasses CLASS LIST
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Structures

Structure: mix-list ()
Package

dynamic-mixins

Source

dynamic-mixins.lisp (file)

Direct superclasses

structure-object (structure)

Direct methods

make-instance (method)

Direct slots
Slot: list
Readers

mix-list-list (function)

Writers

(setf mix-list-list) (function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   D   F   L  
Index Entry  Section

D
dynamic-mixins.asd: The dynamic-mixins<dot>asd file
dynamic-mixins/dynamic-mixins.lisp: The dynamic-mixins/dynamic-mixins<dot>lisp file
dynamic-mixins/package.lisp: The dynamic-mixins/package<dot>lisp file

F
File, Lisp, dynamic-mixins.asd: The dynamic-mixins<dot>asd file
File, Lisp, dynamic-mixins/dynamic-mixins.lisp: The dynamic-mixins/dynamic-mixins<dot>lisp file
File, Lisp, dynamic-mixins/package.lisp: The dynamic-mixins/package<dot>lisp file

L
Lisp File, dynamic-mixins.asd: The dynamic-mixins<dot>asd file
Lisp File, dynamic-mixins/dynamic-mixins.lisp: The dynamic-mixins/dynamic-mixins<dot>lisp file
Lisp File, dynamic-mixins/package.lisp: The dynamic-mixins/package<dot>lisp file

Jump to:   D   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %   (  
C   D   E   F   M   S  
Index Entry  Section

%
%find-class: Internal functions
%mix: Internal functions

(
(setf mix-list-list): Internal functions

C
copy-mix-list: Internal functions

D
define-mixin: Internal functions
delete-from-mix: Exported functions

E
ensure-mix: Exported functions
ensure-mixin: Internal functions

F
Function, %find-class: Internal functions
Function, %mix: Internal functions
Function, (setf mix-list-list): Internal functions
Function, copy-mix-list: Internal functions
Function, define-mixin: Internal functions
Function, delete-from-mix: Exported functions
Function, ensure-mix: Exported functions
Function, ensure-mixin: Internal functions
Function, make-mix-list: Internal functions
Function, mix: Exported functions
Function, mix-list-list: Internal functions
Function, mix-list-p: Internal functions
Function, set-superclasses: Internal functions

M
make-mix-list: Internal functions
mix: Exported functions
mix-list-list: Internal functions
mix-list-p: Internal functions

S
set-superclasses: Internal functions

Jump to:   %   (  
C   D   E   F   M   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
C   L   S  
Index Entry  Section

*
*dynamic-mix-classes*: Internal special variables

C
classes: Exported classes

L
list: Internal structures

S
Slot, classes: Exported classes
Slot, list: Internal structures
Special Variable, *dynamic-mix-classes*: Internal special variables

Jump to:   *  
C   L   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   D   M   P   S  
Index Entry  Section

C
Class, mixin-class: Exported classes
Class, mixin-object: Exported classes

D
dynamic-mixins: The dynamic-mixins system
dynamic-mixins: The dynamic-mixins package
dynamic-mixins.asdf: The dynamic-mixins<dot>asdf package

M
mix-list: Internal structures
mixin-class: Exported classes
mixin-object: Exported classes

P
Package, dynamic-mixins: The dynamic-mixins package
Package, dynamic-mixins.asdf: The dynamic-mixins<dot>asdf package

S
Structure, mix-list: Internal structures
System, dynamic-mixins: The dynamic-mixins system

Jump to:   C   D   M   P   S