This is the method-hooks Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 18:57:43 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
method-hooks
simple qualifiable hooks defined like methods with the option to modify the dispatch method and how dispatch happens
Gnuxie <Gnuxie@protonmail.com>
Gnuxie <Gnuxie@protonmail.com>
Mozilla Public License Version 2.0
0.1.0
src
(module).
Modules are listed depth-first from the system components tree.
method-hooks/src
method-hooks
(system).
package.lisp
(file).
macro-utils.lisp
(file).
combination-management.lisp
(file).
known-dispatchers.lisp
(file).
hook-management.lisp
(file).
method-hooks.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
method-hooks/method-hooks.asd
method-hooks/src/package.lisp
method-hooks/src/macro-utils.lisp
method-hooks/src/combination-management.lisp
method-hooks/src/known-dispatchers.lisp
method-hooks/src/hook-management.lisp
method-hooks/src/method-hooks.lisp
method-hooks/src/macro-utils.lisp
src
(module).
%destructure-defhook-args
(macro).
destructure-specialized-lambda-list
(macro).
method-hooks/src/combination-management.lisp
src
(module).
define-dispatch
(macro).
dispatch
(macro).
dispatch-for-qualifier
(function).
dispatch-function
(reader method).
(setf dispatch-function)
(writer method).
dispatch-function-constructor
(reader method).
(setf dispatch-function-constructor)
(writer method).
dispatcher
(class).
make-dispatcher
(macro).
make-load-form
(method).
set-dispatch-for-qualifier
(function).
*dispatch-for-qualifier*
(special variable).
*dispatch-table*
(special variable).
method-hooks/src/hook-management.lisp
src
(module).
clear-hook-table
(function).
hook
(class).
hook-name
(reader method).
(setf hook-name)
(writer method).
qualifier
(reader method).
(setf qualifier)
(writer method).
specific-hooks-for-generic
(function).
*hook-generics*
(special variable).
*hooks*
(special variable).
combination
(reader method).
(setf combination)
(writer method).
default-qualifier
(reader method).
(setf default-qualifier)
(writer method).
effective-qualifier
(function).
get-default-qualifier
(function).
hook-generic
(class).
intern-hook
(function).
intern-hook-generic
(function).
intern-undeclared-hook-generic
(function).
methods
(reader method).
(setf methods)
(writer method).
method-hooks/src/method-hooks.lisp
src
(module).
defhook
(macro).
define-hook-generic
(macro).
finalize-dispatch-method
(macro).
%defhook-fun
(macro).
%define-method-dispatch
(macro).
%lay-method-base-for-dispatch
(macro).
%load-specializers-to-table
(macro).
with-effective-qualifier
(macro).
Packages are listed by definition order.
method-hooks
common-lisp
.
clear-hook-table
(function).
defhook
(macro).
define-dispatch
(macro).
define-hook-generic
(macro).
dispatch
(macro).
dispatch-for-qualifier
(function).
dispatch-function
(generic reader).
(setf dispatch-function)
(generic writer).
dispatch-function-constructor
(generic reader).
(setf dispatch-function-constructor)
(generic writer).
dispatcher
(class).
finalize-dispatch-method
(macro).
hook
(class).
hook-name
(generic reader).
(setf hook-name)
(generic writer).
make-dispatcher
(macro).
qualifier
(generic reader).
(setf qualifier)
(generic writer).
set-dispatch-for-qualifier
(function).
specific-hooks-for-generic
(function).
%defhook-fun
(macro).
%define-method-dispatch
(macro).
%destructure-defhook-args
(macro).
%lay-method-base-for-dispatch
(macro).
%load-specializers-to-table
(macro).
*dispatch-for-qualifier*
(special variable).
*dispatch-table*
(special variable).
*hook-generics*
(special variable).
*hooks*
(special variable).
combination
(generic reader).
(setf combination)
(generic writer).
default-qualifier
(generic reader).
(setf default-qualifier)
(generic writer).
destructure-specialized-lambda-list
(macro).
effective-qualifier
(function).
get-default-qualifier
(function).
hook-generic
(class).
intern-hook
(function).
intern-hook-generic
(function).
intern-undeclared-hook-generic
(function).
methods
(generic reader).
(setf methods)
(generic writer).
with-effective-qualifier
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
define a hook to be to be called by the effective method.
This macro has roughly the same signature as defmethod ‘(DEFHOOK GENERIC-FUNCTION HOOK-NAME {QUALIFIER} SPECIALIZED-LAMBDA-LIST &BODY BODY)‘
creates a function ‘hook-name‘ with the ‘body‘ then creates a method to dispatch all hooks matching
the type-list for the given generic-function.
See define-hook-generic
See finalize-dispatch-method
the lambda list should accept two arguments:
the list of arguments given by the current method call.
the specific hooks (as named or unamed functions) for the qualified method (that we will be dispatching from).
you should then use the arguments to dispatch the specific hooks as you wish in the body.
if the body returns a result, by default the method will also return that result, this can be overriden with finalize-dispatch-method.
See finalize-dispatch-method
See dispatch
utility to help with gf’s with method combination by remembering the combination type
by default the combination type becomes the default qualifier for any newly defined hooks
this can be overriden by not using this and using defgeneric or supplying
the option :default-qualifier.
supplying ‘:hook-point t‘ will create a method qualified with the default-qualifier
so that the generic acts like an extensible hook point and will not signal
no-applicable-method error when no hooks have been defined.
See defhook
dispatch the hooks using the default dispatcher for the given qualified specific method.
See define-dispatch
See dispatch-function
See set-dispatch-for-qualifier
add a body to the method which dispatched the hooks for the given specialized-lambda-list
useful if you wanted to use call-next-method
For the definition to be effective, it must be defined after every specific hook for the same method hence finalize.
See defhook
will not require recompilation of all the forms unless an existing hook definition is redefined or a method is redefined
the dispatcher used for the given qualifier
See define-dispatch
See dispatcher
accepts two symbols, sets the dispatcher to be used for the given qualifier
See define-dispatch
See dispatcher
get the hooks specific to the type specializer list and qualifier
dispatcher
)) ¶dispatcher
)) ¶a function object for the current environment
dispatcher
)) ¶dispatcher
)) ¶a lambda expression used to construct the function object for dispatch-function.
a lambda expression used to construct the function object for dispatch-function.
list
:dispatch-function-constructor
a function object for the current environment
function
:dispatch-function
used to lookup the symbol for a dispatcher
used to lookup the dispatcher for a symbol
hash table holding information on all of the generics used either indirectly with defhook or directly with define-hook-generic
information about all the hooks used in the image
this is literally just a copy of defun atm.
defines the dispatch method for hooks, will remember the qualifier for the gf
creates a form to load the hooks specific to the gf/type-list/qualifier
from the compilation environment into the internal table inside the runtime environment.
if specialized-lambda-list is ((a integer) b): descriptive-lambda-list will be ((x integer) (x t)) type-list will be (integer t) and vanilla-lambda-list is (a b)
take generic function and a symbol bound to a qualifier and mask that symbol with the effective qualifier.
The effective qualifier is the default qualifier for the given generic function should there be one defined by a define-hook-generic form.
intern the hook into the hooks hashtable by symbol name and into the generic functions table
by type-list and qualifier
as we are keeping references to hook objects in two places and due to the dificulty of keeping both
exactly up to date, specific-hooks-for-generic will remove old references from the hook functions method list before returning the result.
will copy methods across if an existing gf is defined with them
if we stumble across a generic which we don’t know about (ie from using defhook without define-hook-generic) then we must intern it in an appropriate way.
hook-generic
)) ¶automatically generated reader method
hook-generic
)) ¶automatically generated writer method
hook-generic
)) ¶automatically generated reader method
hook-generic
)) ¶automatically generated writer method
hook-generic
)) ¶automatically generated reader method
hook-generic
)) ¶automatically generated writer method
hash-table
(make-hash-table :test (function equal))
:methods
symbol
:combination
symbol
:default-qualifier
Jump to: | %
(
C D E F G H I M Q S W |
---|
Jump to: | %
(
C D E F G H I M Q S W |
---|
Jump to: | *
C D H M Q S |
---|
Jump to: | *
C D H M Q S |
---|
Jump to: | C D F H K M P S |
---|
Jump to: | C D F H K M P S |
---|