The access Reference Manual

This is the access Reference Manual, version 1.6.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sat Dec 03 19:21:22 2022 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 access

A library providing functions that unify data-structure access for Common Lisp: access and (setf access)

Author

Acceleration.net, Russ Tyndall, Nathan Bird, Ryan Davis

License

BSD

Version

1.6.0

Dependencies
  • iterate (system).
  • closer-mop (system).
  • alexandria (system).
  • cl-ppcre (system).
Source

access.asd.

Child Components

3 Files

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


3.1 Lisp


3.1.1 access/access.asd

Source

access.asd.

Parent Component

access (system).

ASDF Systems

access.


3.1.2 access/access.lisp

Source

access.asd.

Parent Component

access (system).

Packages

access.

Public Interface
Internals

3.1.3 access/arg-list-manipulation.lisp

Dependency

access.lisp (file).

Source

access.asd.

Parent Component

access (system).

Public Interface

4 Packages

Packages are listed by definition order.


4.1 access

Source

access.lisp.

Use List
  • common-lisp.
  • iterate.
Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Macros

Macro: disable-dot-syntax ()

Restore readtable which was active before last call to If there was no such call, the standard readtable is used.

Package

access.

Source

access.lisp.

Macro: enable-dot-syntax ()

Enable reader syntax.

Package

access.

Source

access.lisp.

Macro: ensure-arg-list-key-value! (default ids place &key test key)
Package

access.

Source

arg-list-manipulation.lisp.

Macro: rem-arg-list-key-value! (ids place &key test key)
Package

access.

Source

arg-list-manipulation.lisp.

Macro: rem-plist-val! (id place &key test key)
Package

access.

Source

access.lisp.

Macro: set-arg-list-key-value! (new ids place &key test key)
Package

access.

Source

arg-list-manipulation.lisp.

Macro: set-plist-val! (new id place &key test key)
Package

access.

Source

access.lisp.

Macro: with-access ((&rest keys) val-form &body body)

Similar to with-accessors except using the access functions

Package

access.

Source

access.lisp.

Macro: with-access-values ((&rest bindings) obj &body body)

A macro which binds local variables from accessed values on object according to bindings

bindings: (local-symbol-and-access-key
or (local-symbol access-key)
...)
obj: the thing we are accessing data from

Package

access.

Source

access.lisp.

Macro: with-all-slot-access-values ((obj class) &body body)

A macro which binds local variables for each slot value in class as by access

Package

access.

Source

access.lisp.

Macro: with-all-slot-accessors ((data class-name) &body body)

A macro which binds (like with-access) all slot names of a class to a local symbolmacro let storing and retrieving using access

class-name: a symbol or a list of class-names (symbols)
to make this easier to call we ignore quote and or
eg: ’t1=>t1, (or ’t1 ’t2 ...)=> (t1 t2 ...)

Package

access.

Source

access.lisp.

Macro: with-dot (() &body body)
Package

access.

Source

access.lisp.


5.1.2 Setf expanders

Setf Expander: (setf access) (place k &key type test key)

This should allow setting places through access

Package

access.

Source

access.lisp.

Reader

access (function).

Setf Expander: (setf accesses) (place &rest keys)
Package

access.

Source

access.lisp.

Reader

accesses (function).


5.1.3 Ordinary functions

Function: access (o k &key type test key skip-call?)

Access plists, alists, arrays, hashtables and clos objects all through the same interface

skip-call, skips trying to call

Package

access.

Source

access.lisp.

Setf expander for this function

(setf access).

Function: access-copy (from to keys)

Copy the values on ’from’ to ’to’ for all of the keys listed

Package

access.

Source

access.lisp.

Function: accesses (o &rest keys)

keep accessing keys on resulting objects
eg: (accesses o k1 k2) => (access (access o k1) k2)

Package

access.

Source

access.lisp.

Setf expander for this function

(setf accesses).

Function: call-applicable-fns (o &rest fns)

For an object and a list of fn/fn names, call-if-applicable repeatedly

Package

access.

Source

access.lisp.

Function: call-if-applicable (o fn &key warn-if-not-a-fn?)

See if there is a method named fn specialized on o, or a function named fn and call it if so

TODO: dont call macro functions/special forms, they are not applicable

Package

access.

Source

access.lisp.

Function: class-direct-slot-names (o)
Package

access.

Source

access.lisp.

Function: class-direct-slot-readers (o)

ensures o is a class (or list thereof) and returns all the direct slot reader functions)

Package

access.

Source

access.lisp.

Function: class-direct-slot-writers (o)
Package

access.

Source

access.lisp.

Function: class-direct-slots (o)
Package

access.

Source

access.lisp.

Function: class-of-object (o)

returns the class of the object/symbol (or itself if it is a class), if passed a list returns a list of these results

Package

access.

Source

access.lisp.

Function: class-slot-by-name (o k &key test)
Package

access.

Source

access.lisp.

Function: class-slot-definitions (o)
Package

access.

Source

access.lisp.

Function: class-slot-names (o)
Package

access.

Source

access.lisp.

Function: class-slot-readers (o)
Package

access.

Source

access.lisp.

Function: class-slot-writers (o)
Package

access.

Source

access.lisp.

Function: ensure-slot-name (sn)
Package

access.

Source

access.lisp.

Function: equalper (x y)

compares symbols by equalp symbol-name

Package

access.

Source

access.lisp.

Function: get-slot-value (o sn)

like slot-value but without boundedness errors and works with slot definitions

Package

access.

Source

access.lisp.

Function: has-reader? (o reader-name)

For o, does a reader function exist for it

Package

access.

Source

access.lisp.

Function: has-slot? (o slot-name &key lax?)

Does o have a slot named slot-name

if lax? we will ignore packages to find the slot we will always return a slot-name from the specified package if it exists, otherwise we return the slot-name we found if its in a different package

Package

access.

Source

access.lisp.

Function: has-writer? (o writer-name)

For o, does a writer function exist for it?

Package

access.

Source

access.lisp.

Function: mutate-access (o k fn)

Mutate the value stored in key k on object o, by passing it through fn

Package

access.

Source

access.lisp.

Function: set-access (new o k &key type test key)

set places in plists, alists, hashtables and clos objects all through the same interface

Package

access.

Source

access.lisp.

Function: set-accesses (new o &rest keys)

keep accessing till you get to the end of keys , then store the result of setting that field back up the call tree

returns the new value and the object that was stored there
(so for a plist / alist you have a ref to the val and the full list)

Package

access.

Source

access.lisp.

Function: split-dot-sym (sym)
Package

access.

Source

access.lisp.


5.1.4 Generic functions

Generic Function: arg-list-key-value (id arg-list &key test key)

Given an &rest value that contains a (partial) lambda list with keys somewhere in it, find the specified value for a given key

Package

access.

Source

arg-list-manipulation.lisp.

Methods
Method: arg-list-key-value (id arg-list &key test key)
Generic Function: class-slots (o)

returns the slots for the class/obj or list of class/obj passed in

Package

access.

Source

access.lisp.

Methods
Method: class-slots (o)
Generic Function: do-access (o k &key test key type skip-call?)
Package

access.

Source

access.lisp.

Methods
Method: do-access ((o list) k &key test key type skip-call?)
Method: do-access ((o array) k &key type test key skip-call?)
Method: do-access ((o hash-table) k &key type test key skip-call?)
Method: do-access (o k &key test key type skip-call?)
Generic Function: do-set-access (new o k &key type test key)
Package

access.

Source

access.lisp.

Methods
Method: do-set-access :around (new o k &key type test key)
Method: do-set-access (new (o list) k &key type test key)
Method: do-set-access (new (o array) k &key type test key)
Method: do-set-access (new (o hash-table) k &key type test key)
Method: do-set-access (new (o standard-object) k &key type test key)
Generic Function: ensure-arg-list-key-value (default id arg-list &key test key)

Ensure that a specific keyword has a value (or default) in an appliable arg list

Package

access.

Source

arg-list-manipulation.lisp.

Methods
Method: ensure-arg-list-key-value (default id arg-list &key test key)
Generic Function: plist-val (id list &key test key)

get a value out of a plist based on its key

Package

access.

Source

access.lisp.

Methods
Method: plist-val (id list &key test key)
Generic Function: rem-arg-list-key-value (id arg-list &key test key)

Remove a specific keyword and value from the

Package

access.

Source

arg-list-manipulation.lisp.

Methods
Method: rem-arg-list-key-value (id arg-list &key test key)
Generic Function: rem-plist-val (id list &key test key)

removes key & its value from plist returning (values plist (list-of-values-removed))

Package

access.

Source

access.lisp.

Methods
Method: rem-plist-val (id list &key test key)
Generic Function: set-arg-list-key-value (new id arg-list &key test key ensure?)

Set the keyword parameter id to the value new
if ensure? then only set if it doesnt exist (in which case new acts as a default)

Package

access.

Source

arg-list-manipulation.lisp.

Methods
Method: set-arg-list-key-value (new id arg-list &key test key ensure?)
Generic Function: set-plist-val (new id list &key test key)

If a key exists in the plist, set its value, otherwise add this key to the dictionary

Package

access.

Source

access.lisp.

Methods
Method: set-plist-val (new id list &key test key)

5.1.5 Conditions

Condition: access-warning
Package

access.

Source

access.lisp.

Direct superclasses

5.2 Internals


5.2.1 Special variables

Special Variable: *default-key*
Package

access.

Source

access.lisp.

Special Variable: *default-test*
Package

access.

Source

access.lisp.

Special Variable: *dot-previous-readtables*

A stack which holds the previous readtables that have been pushed here by ENABLE-DOT-SYNTAX.

Package

access.

Source

access.lisp.


5.2.2 Ordinary functions

Function: %create-accessor-symbol-list (class)

Gets the slots off a class an builds binding like (local::symbol orig::symbol) where local is the current *package* and orig is the original package of the symbol

used in with-all-slot-accessors

Package

access.

Source

access.lisp.

Function: %disable-dot-syntax ()

Internal function used to restore previous readtable.

Package

access.

Source

access.lisp.

Function: %enable-dot-syntax ()

Internal function used to enable reader syntax and store current readtable on stack.

Package

access.

Source

access.lisp.

Function: %initialize-null-container (k type test)
Package

access.

Source

access.lisp.

Function: %remove-quote-&-or (class-name)

remove any quote / ors so that list type-specifications

Package

access.

Source

access.lisp.

Function: %slot-readers (slots)
Package

access.

Source

access.lisp.

Function: %slot-writers (slots)
Package

access.

Source

access.lisp.

Function: %to-hash-test (test)
Package

access.

Source

access.lisp.

Function: %with-all-slot-helper (data class-name body &key with-name add-ignorables?)

A macro which binds (like with-access) all slot names of a class to a local symbolmacro let storing and retrieving using access

class-name: a symbol or a list of class-names (symbols)
to make this easier to call we ignore quote and or
eg: ’t1=>t1, (or ’t1 ’t2 ...)=> (t1 t2 ...)

Package

access.

Source

access.lisp.

Function: access-warn (message &rest args)
Package

access.

Source

access.lisp.

Function: appended (fn lst)

Mapcan caused all sorts of trouble with its NCONCing

Package

access.

Source

access.lisp.

Function: default-key ()
Package

access.

Source

access.lisp.

Function: default-test ()
Package

access.

Source

access.lisp.

Function: dot-reader (-stream- char arg)

Reads a form and replaces dot calls

Package

access.

Source

access.lisp.

Function: dot-translate-walker (form)
Package

access.

Source

access.lisp.

Function: name-has-dot? (n)
Package

access.

Source

access.lisp.

Function: replace-dot-calls (forms)
Package

access.

Source

access.lisp.

Function: setf-if-applicable (new o fn)

If we find a setf function named (setf fn) that can operate on o then call that with value new

Package

access.

Source

access.lisp.

Function: translate-dot-sym (sym)
Package

access.

Source

access.lisp.


5.2.3 Generic functions

Generic Reader: format-args (condition)
Generic Writer: (setf format-args) (condition)
Package

access.

Methods
Reader Method: format-args ((condition access-condition))
Writer Method: (setf format-args) ((condition access-condition))
Source

access.lisp.

Target Slot

format-args.

Generic Reader: format-control (condition)
Generic Writer: (setf format-control) (condition)
Package

access.

Methods
Reader Method: format-control ((condition access-condition))
Writer Method: (setf format-control) ((condition access-condition))
Source

access.lisp.

Target Slot

format-control.

Generic Reader: original-error (condition)
Generic Writer: (setf original-error) (condition)
Package

access.

Methods
Reader Method: original-error ((condition access-condition))
Writer Method: (setf original-error) ((condition access-condition))
Source

access.lisp.

Target Slot

original-error.


5.2.4 Conditions

Condition: access-condition
Package

access.

Source

access.lisp.

Direct superclasses

simple-condition.

Direct subclasses

access-warning.

Direct methods
Direct slots
Slot: format-control
Initform

(quote nil)

Initargs

:format-control

Readers

format-control.

Writers

(setf format-control).

Slot: format-args
Initform

(quote nil)

Initargs

:format-args

Readers

format-args.

Writers

(setf format-args).

Slot: original-error
Initform

(quote nil)

Initargs

:original-error

Readers

original-error.

Writers

(setf original-error).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
A   C   D   E   F   G   H   M   N   O   P   R   S   T   W  
Index Entry  Section

%
%create-accessor-symbol-list: Private ordinary functions
%disable-dot-syntax: Private ordinary functions
%enable-dot-syntax: Private ordinary functions
%initialize-null-container: Private ordinary functions
%remove-quote-&-or: Private ordinary functions
%slot-readers: Private ordinary functions
%slot-writers: Private ordinary functions
%to-hash-test: Private ordinary functions
%with-all-slot-helper: Private ordinary functions

(
(setf access): Public setf expanders
(setf accesses): Public setf expanders
(setf format-args): Private generic functions
(setf format-args): Private generic functions
(setf format-control): Private generic functions
(setf format-control): Private generic functions
(setf original-error): Private generic functions
(setf original-error): Private generic functions

A
access: Public ordinary functions
access-copy: Public ordinary functions
access-warn: Private ordinary functions
accesses: Public ordinary functions
appended: Private ordinary functions
arg-list-key-value: Public generic functions
arg-list-key-value: Public generic functions

C
call-applicable-fns: Public ordinary functions
call-if-applicable: Public ordinary functions
class-direct-slot-names: Public ordinary functions
class-direct-slot-readers: Public ordinary functions
class-direct-slot-writers: Public ordinary functions
class-direct-slots: Public ordinary functions
class-of-object: Public ordinary functions
class-slot-by-name: Public ordinary functions
class-slot-definitions: Public ordinary functions
class-slot-names: Public ordinary functions
class-slot-readers: Public ordinary functions
class-slot-writers: Public ordinary functions
class-slots: Public generic functions
class-slots: Public generic functions

D
default-key: Private ordinary functions
default-test: Private ordinary functions
disable-dot-syntax: Public macros
do-access: Public generic functions
do-access: Public generic functions
do-access: Public generic functions
do-access: Public generic functions
do-access: Public generic functions
do-set-access: Public generic functions
do-set-access: Public generic functions
do-set-access: Public generic functions
do-set-access: Public generic functions
do-set-access: Public generic functions
do-set-access: Public generic functions
dot-reader: Private ordinary functions
dot-translate-walker: Private ordinary functions

E
enable-dot-syntax: Public macros
ensure-arg-list-key-value: Public generic functions
ensure-arg-list-key-value: Public generic functions
ensure-arg-list-key-value!: Public macros
ensure-slot-name: Public ordinary functions
equalper: Public ordinary functions

F
format-args: Private generic functions
format-args: Private generic functions
format-control: Private generic functions
format-control: Private generic functions
Function, %create-accessor-symbol-list: Private ordinary functions
Function, %disable-dot-syntax: Private ordinary functions
Function, %enable-dot-syntax: Private ordinary functions
Function, %initialize-null-container: Private ordinary functions
Function, %remove-quote-&-or: Private ordinary functions
Function, %slot-readers: Private ordinary functions
Function, %slot-writers: Private ordinary functions
Function, %to-hash-test: Private ordinary functions
Function, %with-all-slot-helper: Private ordinary functions
Function, access: Public ordinary functions
Function, access-copy: Public ordinary functions
Function, access-warn: Private ordinary functions
Function, accesses: Public ordinary functions
Function, appended: Private ordinary functions
Function, call-applicable-fns: Public ordinary functions
Function, call-if-applicable: Public ordinary functions
Function, class-direct-slot-names: Public ordinary functions
Function, class-direct-slot-readers: Public ordinary functions
Function, class-direct-slot-writers: Public ordinary functions
Function, class-direct-slots: Public ordinary functions
Function, class-of-object: Public ordinary functions
Function, class-slot-by-name: Public ordinary functions
Function, class-slot-definitions: Public ordinary functions
Function, class-slot-names: Public ordinary functions
Function, class-slot-readers: Public ordinary functions
Function, class-slot-writers: Public ordinary functions
Function, default-key: Private ordinary functions
Function, default-test: Private ordinary functions
Function, dot-reader: Private ordinary functions
Function, dot-translate-walker: Private ordinary functions
Function, ensure-slot-name: Public ordinary functions
Function, equalper: Public ordinary functions
Function, get-slot-value: Public ordinary functions
Function, has-reader?: Public ordinary functions
Function, has-slot?: Public ordinary functions
Function, has-writer?: Public ordinary functions
Function, mutate-access: Public ordinary functions
Function, name-has-dot?: Private ordinary functions
Function, replace-dot-calls: Private ordinary functions
Function, set-access: Public ordinary functions
Function, set-accesses: Public ordinary functions
Function, setf-if-applicable: Private ordinary functions
Function, split-dot-sym: Public ordinary functions
Function, translate-dot-sym: Private ordinary functions

G
Generic Function, (setf format-args): Private generic functions
Generic Function, (setf format-control): Private generic functions
Generic Function, (setf original-error): Private generic functions
Generic Function, arg-list-key-value: Public generic functions
Generic Function, class-slots: Public generic functions
Generic Function, do-access: Public generic functions
Generic Function, do-set-access: Public generic functions
Generic Function, ensure-arg-list-key-value: Public generic functions
Generic Function, format-args: Private generic functions
Generic Function, format-control: Private generic functions
Generic Function, original-error: Private generic functions
Generic Function, plist-val: Public generic functions
Generic Function, rem-arg-list-key-value: Public generic functions
Generic Function, rem-plist-val: Public generic functions
Generic Function, set-arg-list-key-value: Public generic functions
Generic Function, set-plist-val: Public generic functions
get-slot-value: Public ordinary functions

H
has-reader?: Public ordinary functions
has-slot?: Public ordinary functions
has-writer?: Public ordinary functions

M
Macro, disable-dot-syntax: Public macros
Macro, enable-dot-syntax: Public macros
Macro, ensure-arg-list-key-value!: Public macros
Macro, rem-arg-list-key-value!: Public macros
Macro, rem-plist-val!: Public macros
Macro, set-arg-list-key-value!: Public macros
Macro, set-plist-val!: Public macros
Macro, with-access: Public macros
Macro, with-access-values: Public macros
Macro, with-all-slot-access-values: Public macros
Macro, with-all-slot-accessors: Public macros
Macro, with-dot: Public macros
Method, (setf format-args): Private generic functions
Method, (setf format-control): Private generic functions
Method, (setf original-error): Private generic functions
Method, arg-list-key-value: Public generic functions
Method, class-slots: Public generic functions
Method, do-access: Public generic functions
Method, do-access: Public generic functions
Method, do-access: Public generic functions
Method, do-access: Public generic functions
Method, do-set-access: Public generic functions
Method, do-set-access: Public generic functions
Method, do-set-access: Public generic functions
Method, do-set-access: Public generic functions
Method, do-set-access: Public generic functions
Method, ensure-arg-list-key-value: Public generic functions
Method, format-args: Private generic functions
Method, format-control: Private generic functions
Method, original-error: Private generic functions
Method, plist-val: Public generic functions
Method, rem-arg-list-key-value: Public generic functions
Method, rem-plist-val: Public generic functions
Method, set-arg-list-key-value: Public generic functions
Method, set-plist-val: Public generic functions
mutate-access: Public ordinary functions

N
name-has-dot?: Private ordinary functions

O
original-error: Private generic functions
original-error: Private generic functions

P
plist-val: Public generic functions
plist-val: Public generic functions

R
rem-arg-list-key-value: Public generic functions
rem-arg-list-key-value: Public generic functions
rem-arg-list-key-value!: Public macros
rem-plist-val: Public generic functions
rem-plist-val: Public generic functions
rem-plist-val!: Public macros
replace-dot-calls: Private ordinary functions

S
set-access: Public ordinary functions
set-accesses: Public ordinary functions
set-arg-list-key-value: Public generic functions
set-arg-list-key-value: Public generic functions
set-arg-list-key-value!: Public macros
set-plist-val: Public generic functions
set-plist-val: Public generic functions
set-plist-val!: Public macros
Setf Expander, (setf access): Public setf expanders
Setf Expander, (setf accesses): Public setf expanders
setf-if-applicable: Private ordinary functions
split-dot-sym: Public ordinary functions

T
translate-dot-sym: Private ordinary functions

W
with-access: Public macros
with-access-values: Public macros
with-all-slot-access-values: Public macros
with-all-slot-accessors: Public macros
with-dot: Public macros