Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the clutter Reference Manual, version 1.0.0, generated automatically by Declt version 3.0 "Montgomery Scott" on Sun May 15 04:27:21 2022 GMT+0.
• Introduction | What clutter is all about | |
• Systems | The systems documentation | |
• Modules | The modules documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
Clutter is a library to allow us Lispers to, well, clutter our beautiful CLOS classes and their slots with additional information (attributes or, as they're called in other languages, annotations or decorators).
One may thus define a class like the following:
(defclass my-class (my-superclass)
((some-slot :attributes ((pretty-name . "My precious") (validator . #'valid-treasure-p))))
(:attributes (pretty-name . "My class") (version . "1.1"))
(:metaclass clutter:standard-class-with-attributes))
Then, we can query the class and slot for information about their attributes:
(attribute 'pretty-name 'my-class) => "My class"
(attribute 'pretty-name (slot 'some-slot 'my-class)) => "My precious"
attribute
is also a SETFable place.
Note that attributes in subclasses can override attributes in superclasses.
Internally, attributes are stored in hash tables. However, for convenience, we provide them as alists in defclass forms.
Note that defclass doesn't evaluate the attributes. If they're not literal constants you have to set them programmatically with setf attribute
.
Also note that effective attributes are computed by finalize-inheritance
, which is invoked by the MOP at some point between the declaration of the class and the creation of its first instance. When in doubt, call finalize-inheritance
manually to ensure that you can query and update attributes.
Next: Modules, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The clutter system |
Alessio Stalla
LGPL
Cluttering classes and slots with annotations/decorators/attributes metadata
1.0.0
clutter.asd (file)
src (module)
Modules are listed depth-first from the system components tree.
• The clutter/src module |
clutter (system)
src/
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The clutter.asd file | ||
• The clutter/src/packages.lisp file | ||
• The clutter/src/clutter.lisp file |
Next: The clutter/src/packages․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
clutter.asd
clutter (system)
Next: The clutter/src/clutter․lisp file, Previous: The clutter․asd file, Up: Lisp files [Contents][Index]
Previous: The clutter/src/packages․lisp file, Up: Lisp files [Contents][Index]
src (module)
src/clutter.lisp
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The clutter package |
packages.lisp (file)
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported functions | ||
• Exported generic functions | ||
• Exported classes |
Next: Exported generic functions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
clutter.lisp (file)
clutter.lisp (file)
Next: Exported classes, Previous: Exported functions, Up: Exported definitions [Contents][Index]
clutter.lisp (file)
clutter.lisp (file)
automatically generated reader method
clutter.lisp (file)
automatically generated writer method
clutter.lisp (file)
Previous: Exported generic functions, Up: Exported definitions [Contents][Index]
Mixin for elements that can have attributes
clutter.lisp (file)
standard-object (class)
:attributes
(make-hash-table)
attributes-of (generic function)
(setf attributes-of) (generic function)
clutter.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal functions | ||
• Internal generic functions | ||
• Internal classes |
Next: Internal generic functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
clutter.lisp (file)
clutter.lisp (file)
Next: Internal classes, Previous: Internal functions, Up: Internal definitions [Contents][Index]
automatically generated reader method
clutter.lisp (file)
clutter.lisp (file)
automatically generated reader method
clutter.lisp (file)
clutter.lisp (file)
Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
clutter.lisp (file)
clutter.lisp (file)
clutter.lisp (file)
standard-object (class)
:own
own-attributes (generic function)
:ancestors
ancestors (generic function)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | C F L M |
---|
Jump to: | C F L M |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | (
A F G M O S |
---|
Jump to: | (
A F G M O S |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | A O S |
---|
Jump to: | A O S |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | -
C D E M P S |
---|
Jump to: | -
C D E M P S |
---|