This is the moptilities Reference Manual, version 0.3.13, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:06:56 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
moptilities
Common Lisp MOP utilities
Gary Warren King <gwking@metabang.com>
Gary Warren King <gwking@metabang.com>
MIT Style license
MOP utilities provide a common interface between lisps and make the MOP easier to use.
0.3.13
closer-mop
(system).
sb-introspect
(system)., required, for feature :sbcl
Modules are listed depth-first from the system components tree.
moptilities/dev
moptilities
(system).
moptilities.lisp
(file).
notes.text
(file).
moptilities/website
moptilities
(system).
source
(module).
Files are sorted by type and then listed depth-first from the systems components trees.
moptilities/dev/moptilities.lisp
dev
(module).
*debugging-finalization*
(special variable).
care-when-finalized
(function).
class-name-of
(generic function).
copy-template
(generic function).
default-initargs
(function).
direct-slot-names
(generic function).
direct-specializers-of
(function).
direct-subclasses
(function).
direct-superclasses
(function).
eql-specializer-p
(generic function).
finalize-class-if-necessary
(function).
function-arglist
(function).
generic-functions
(function).
get-class
(generic function).
get-method
(generic function).
get-slot-definition
(generic function).
ignore-finalization
(function).
leaf-class-p
(function).
leaf-subclasses
(function).
map-methods
(function).
map-subclasses
(function).
method-name
(generic function).
mopu-class-initargs
(function).
reader-method-p
(generic function).
remove-generic-function
(function).
remove-methods
(function).
remove-methods-if
(function).
slot-names
(generic function).
slot-properties
(generic function).
specializers-of
(function).
subclasses
(function).
superclasses
(function).
when-finalized
(generic function).
writer-method-p
(generic function).
get-function
(generic function).
get-structure
(function).
in-order-p
(function).
nyi
(macro).
Packages are listed by definition order.
metabang.moptilities
Moptilities builds on the Lisp Meta-Object Protocol (**MOP**).
mopu
moptilities
closer-common-lisp
.
*debugging-finalization*
(special variable).
care-when-finalized
(function).
class-name-of
(generic function).
copy-template
(generic function).
default-initargs
(function).
direct-slot-names
(generic function).
direct-specializers-of
(function).
direct-subclasses
(function).
direct-superclasses
(function).
eql-specializer-p
(generic function).
finalize-class-if-necessary
(function).
function-arglist
(function).
generic-functions
(function).
get-class
(generic function).
get-method
(generic function).
get-slot-definition
(generic function).
ignore-finalization
(function).
leaf-class-p
(function).
leaf-subclasses
(function).
map-methods
(function).
map-subclasses
(function).
method-name
(generic function).
mopu-class-initargs
(function).
reader-method-p
(generic function).
remove-generic-function
(function).
remove-methods
(function).
remove-methods-if
(function).
slot-names
(generic function).
slot-properties
(generic function).
specializers-of
(function).
subclasses
(function).
superclasses
(function).
when-finalized
(generic function).
writer-method-p
(generic function).
get-function
(generic function).
get-structure
(function).
in-order-p
(function).
nyi
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
When true, finalization messages are printed to *debug-io*
Ensures the when-finalized is called on the object just before it is garbage collected.
Returns a list of default initarg information for the class-specifier. This list consists of triples in the format <initarg value function>. The initarg is the initarg corresponding to the default-initarg; the value is the value it will default to and the function is a function of zero-arguments that returns value... (this is subject to minor changes).
Returns a list of the direct specializers of thing. Thing can a class, object representing a class or symbol naming a class. The keyword arguments :readers?, :writers?, and :other? control which specializers are returned (reader methods, writer methods and other methods respectively). The keyword argument :short-form? controls whether a list of methods is returned or just a list of names.
Returns the immediate subclasses of thing. Thing can be a class, object or symbol naming a class.
Returns the immediate superclasses of thing. Thing can be a class, object or symbol naming a class.
Finalizes thing if necessary. Thing can be a class, object or symbol naming a class. Returns the class of thing.
Returns two values, the arglist of symbol
Returns a list of all of the direct generic-functions associated with thing. Thing can be a class, object, or symbol naming a class.
Prevents care-when-finalized from being called on object just before it is garbage collected.
Returns true if the class has no subclasses.
Returns a list of subclasses of thing that have no subclasses of their own; i.e., the leaves of the class tree rooted at thing. Thing can be a class, object or symbol naming a class.
Applys fn to all of the direct methods of thing (which can be a class, object or symbol naming a class). The function should take two arguments: a generic function and a method.
Applies fn to each subclass of class. If proper? is true, then
the class itself is not included in the mapping. Proper? defaults to nil.
Removes all methods associated with class-specifier. Class-specifier can be a class, object representing a class or symbol naming a class. If dry-run? is true (and verbose? is also true), then the methods that would be removed are printed but no methods are actually removed. Returns the number of methods that are removed (or that would have been removed if dry-run? is true).
Removes all methods associated with class-specifier that pass a predicate. Class-specifier can be a class, object representing a class or symbol naming a class. The predicate should be a function of two arguments: a generic-function and a method. If dry-run? is true (and verbose? is also true), then the methods that would be removed are printed but no methods are actually removed. Returns the number of methods that are removed (or that would have been removed if dry-run? is true).
Like direct-specializers-of but returns all the specializers, not just the direct ones.
Returns the subclasses of ‘class‘.
Class may be a symbol naming a class, a instance of a class or a class object. If ‘proper?‘ is true (the default) then the class itself will _not_ be included in the result. If ‘proper?‘ is nil, then it will.
Returns a list of superclasses of thing. Thing can be a class, object or symbol naming a class. The list of classes returned is ’proper’; it does not include the class itself.
Returns the name of thing’s class.
Suppose you make an instance of the class foo:
(defclass foo ()
((test :accessor test :initform #’equal :initarg :test)))
(setf *foo* (make-instance ’foo :test #’eql))
Its ‘test‘ slot will be set to #’eql:
(test *foo*) => #’eql
If you want to make a structural clone (for lack of a better term)
of ‘*foo*‘, you might try:
(setf *new-foo* (make-instance (type-of *foo*)))
But ‘*new-foo*‘’s test slot won’t be set properly:
(test *new-foo*) => #’equal
For simple classes, this is no problem but suppose we have
a graph from [CL-Graph][] and want to make a copy of that:
(make-graph (type-of old-graph)
:vertex-test (vertex-test old-graph)
:vertex-key (vertex-key old-graph)
:edge-test (edge-test old-graph)
:edge-key (edge-key old-graph)
:default-edge-type (default-edge-type old-graph)
:default-edge-class (default-edge-class old-graph)
:directed-edge-class (directed-edge-class old-graph)
:undirected-edge-class (undirected-edge-class old-graph))))
Yuck!
Copy-template is a reasonable, though not perfect, solution to this
problem; it creates a structural copy of an object such that the copy
has all of its initargs correctly set.
[CL-Graph]: http://common-lisp.net/projects/cl-graph/
standard-object
)) ¶Returns a list of the names of the slots that are defined _directly_ in the class-specifier (as opposed to slots defined in superclasses).
If thing is an eql-specializer, returns a representation of thing as (eql <object>).
Returns the class of thing or nil if the class cannot be found. Thing can be a class, an object representing a class or a symbol naming a class. Get-class is like find-class only not as particular.
Returns the slot-definition for the slot named ‘slot-name‘ in the class specified by ‘class-specifier‘. Also returns (as a second value) true if the slot is an indirect slot of the class.
standard-method
)) ¶Returns true if thing is a reader method (i.e., a subclass of standard-reader-method).
Returns a list of the names of the slots of a class ~ (including both direct and inherited slots). It’s like ~ class-slot-names but on the class, not an instance of the class.
Returns a property list describing the slot named slot-name in class-specifier.
Called just before an object is garbage collected if care-when-finalize has been called on the object.
Returns true if thing is a writer method (i.e., a subclass of standard-writer-method).
Signals an error saying that ‘function-name‘ is not yet implemented. The ‘args‘ are ignored.
get-structure name
If ‘name’ has been defined as a structure then return its description. Otherwise signal an error if errorp is t.
Jump to: | C D E F G I L M N R S W |
---|
Jump to: | C D E F G I L M N R S W |
---|
Jump to: | *
S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
* | |||
*debugging-finalization* : | Public special variables | ||
| |||
S | |||
Special Variable, *debugging-finalization* : | Public special variables | ||
|
Jump to: | *
S |
---|
Jump to: | D F I M N P S W |
---|
Jump to: | D F I M N P S W |
---|