The clutter Reference Manual

Table of Contents

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

The clutter Reference Manual

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.


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

1 Introduction

Clutter

Annotations/decorators/attributes for CLOS classes and slots

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: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


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

2.1 clutter

Author

Alessio Stalla

License

LGPL

Description

Cluttering classes and slots with annotations/decorators/attributes metadata

Version

1.0.0

Dependencies
Source

clutter.asd (file)

Component

src (module)


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

3 Modules

Modules are listed depth-first from the system components tree.


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

3.1 clutter/src

Parent

clutter (system)

Location

src/

Components

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

4 Files

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


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

4.1 Lisp


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

4.1.1 clutter.asd

Location

clutter.asd

Systems

clutter (system)


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

4.1.2 clutter/src/packages.lisp

Parent

src (module)

Location

src/packages.lisp

Packages

clutter


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

4.1.3 clutter/src/clutter.lisp

Parent

src (module)

Location

src/clutter.lisp

Exported Definitions
Internal Definitions

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

5 Packages

Packages are listed by definition order.


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

5.1 clutter

Source

packages.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

6 Definitions

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


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

6.1 Exported definitions


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

6.1.1 Functions

Function: attribute NAME ATTRIBUTED-ELEMENT
Function: (setf attribute) VALUE NAME ATTRIBUTED-ELEMENT
Package

clutter

Source

clutter.lisp (file)

Function: slot NAME CLASS
Package

clutter

Source

clutter.lisp (file)


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

6.1.2 Generic functions

Generic Function: attributes-of OBJECT
Generic Function: (setf attributes-of) NEW-VALUE OBJECT
Package

clutter

Methods
Method: attributes-of ANYTHING
Source

clutter.lisp (file)

Method: attributes-of (C symbol)
Source

clutter.lisp (file)

Method: attributes-of (-WITH-ATTRIBUTES -with-attributes)

automatically generated reader method

Source

clutter.lisp (file)

Method: (setf attributes-of) NEW-VALUE (-WITH-ATTRIBUTES -with-attributes)

automatically generated writer method

Source

clutter.lisp (file)


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

6.1.3 Classes

Class: -with-attributes ()

Mixin for elements that can have attributes

Package

clutter

Source

clutter.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
  • finalize-inheritance (method)
  • attributes-of (method)
  • attributes-of (method)
Direct slots
Slot: attributes
Initargs

:attributes

Initform

(make-hash-table)

Readers

attributes-of (generic function)

Writers

(setf attributes-of) (generic function)

Class: standard-class-with-attributes ()
Package

clutter

Source

clutter.lisp (file)

Direct superclasses
Direct methods
  • compute-effective-slot-definition (method)
  • effective-slot-definition-class (method)
  • direct-slot-definition-class (method)
  • validate-superclass (method)

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

6.2 Internal definitions


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

6.2.1 Functions

Function: attributes->hash-table ATTRIBUTES
Package

clutter

Source

clutter.lisp (file)

Function: merge-attributes INSTANCE &rest ANCESTORS
Package

clutter

Source

clutter.lisp (file)


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

6.2.2 Generic functions

Generic Function: ancestors OBJECT
Package

clutter

Methods
Method: ancestors (MERGED-ATTRIBUTES merged-attributes)

automatically generated reader method

Source

clutter.lisp (file)

Generic Function: get-attribute MAP NAME
Package

clutter

Source

clutter.lisp (file)

Methods
Method: get-attribute (MAP merged-attributes) NAME
Method: get-attribute (MAP hash-table) NAME
Generic Function: own-attributes OBJECT
Package

clutter

Methods
Method: own-attributes (MERGED-ATTRIBUTES merged-attributes)

automatically generated reader method

Source

clutter.lisp (file)

Generic Function: set-attribute MAP NAME VALUE
Package

clutter

Source

clutter.lisp (file)

Methods
Method: set-attribute (MAP merged-attributes) NAME VALUE
Method: set-attribute (MAP hash-table) NAME VALUE

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

6.2.3 Classes

Class: direct-slot-definition-with-attributes ()
Package

clutter

Source

clutter.lisp (file)

Direct superclasses
Class: effective-slot-definition-with-attributes ()
Package

clutter

Source

clutter.lisp (file)

Direct superclasses
Class: merged-attributes ()
Package

clutter

Source

clutter.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: own-attributes
Initargs

:own

Readers

own-attributes (generic function)

Slot: ancestors
Initargs

:ancestors

Readers

ancestors (generic function)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
clutter.asd: The clutter․asd file
clutter/src: The clutter/src module
clutter/src/clutter.lisp: The clutter/src/clutter․lisp file
clutter/src/packages.lisp: The clutter/src/packages․lisp file

F
File, Lisp, clutter.asd: The clutter․asd file
File, Lisp, clutter/src/clutter.lisp: The clutter/src/clutter․lisp file
File, Lisp, clutter/src/packages.lisp: The clutter/src/packages․lisp file

L
Lisp File, clutter.asd: The clutter․asd file
Lisp File, clutter/src/clutter.lisp: The clutter/src/clutter․lisp file
Lisp File, clutter/src/packages.lisp: The clutter/src/packages․lisp file

M
Module, clutter/src: The clutter/src module

Jump to:   C   F   L   M  

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

A.2 Functions

Jump to:   (  
A   F   G   M   O   S  
Index Entry  Section

(
(setf attribute): Exported functions
(setf attributes-of): Exported generic functions
(setf attributes-of): Exported generic functions

A
ancestors: Internal generic functions
ancestors: Internal generic functions
attribute: Exported functions
attributes->hash-table: Internal functions
attributes-of: Exported generic functions
attributes-of: Exported generic functions
attributes-of: Exported generic functions
attributes-of: Exported generic functions

F
Function, (setf attribute): Exported functions
Function, attribute: Exported functions
Function, attributes->hash-table: Internal functions
Function, merge-attributes: Internal functions
Function, slot: Exported functions

G
Generic Function, (setf attributes-of): Exported generic functions
Generic Function, ancestors: Internal generic functions
Generic Function, attributes-of: Exported generic functions
Generic Function, get-attribute: Internal generic functions
Generic Function, own-attributes: Internal generic functions
Generic Function, set-attribute: Internal generic functions
get-attribute: Internal generic functions
get-attribute: Internal generic functions
get-attribute: Internal generic functions

M
merge-attributes: Internal functions
Method, (setf attributes-of): Exported generic functions
Method, ancestors: Internal generic functions
Method, attributes-of: Exported generic functions
Method, attributes-of: Exported generic functions
Method, attributes-of: Exported generic functions
Method, get-attribute: Internal generic functions
Method, get-attribute: Internal generic functions
Method, own-attributes: Internal generic functions
Method, set-attribute: Internal generic functions
Method, set-attribute: Internal generic functions

O
own-attributes: Internal generic functions
own-attributes: Internal generic functions

S
set-attribute: Internal generic functions
set-attribute: Internal generic functions
set-attribute: Internal generic functions
slot: Exported functions

Jump to:   (  
A   F   G   M   O   S  

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

A.3 Variables

Jump to:   A   O   S  
Index Entry  Section

A
ancestors: Internal classes
attributes: Exported classes

O
own-attributes: Internal classes

S
Slot, ancestors: Internal classes
Slot, attributes: Exported classes
Slot, own-attributes: Internal classes

Jump to:   A   O   S  

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

A.4 Data types

Jump to:   -  
C   D   E   M   P   S  
Index Entry  Section

-
-with-attributes: Exported classes

C
Class, -with-attributes: Exported classes
Class, direct-slot-definition-with-attributes: Internal classes
Class, effective-slot-definition-with-attributes: Internal classes
Class, merged-attributes: Internal classes
Class, standard-class-with-attributes: Exported classes
clutter: The clutter system
clutter: The clutter package

D
direct-slot-definition-with-attributes: Internal classes

E
effective-slot-definition-with-attributes: Internal classes

M
merged-attributes: Internal classes

P
Package, clutter: The clutter package

S
standard-class-with-attributes: Exported classes
System, clutter: The clutter system

Jump to:   -  
C   D   E   M   P   S