The cl-getx Reference Manual

This is the cl-getx Reference Manual, version 2020.7.15, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed May 15 04:02:35 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 cl-getx

This is a naive, persisted, in memory (lazy loading) data store for Common Lisp.

Author

Phil Marneweck <>

License

MIT

Version

2020.7.15

Source

cl-getx.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 cl-getx/cl-getx.asd

Source

cl-getx.asd.

Parent Component

cl-getx (system).

ASDF Systems

cl-getx.


3.1.2 cl-getx/packages.lisp

Source

cl-getx.asd.

Parent Component

cl-getx (system).

Packages

cl-getx.


3.1.3 cl-getx/getx.lisp

Dependency

packages.lisp (file).

Source

cl-getx.asd.

Parent Component

cl-getx (system).

Public Interface

3.1.4 cl-getx/digx.lisp

Dependency

getx.lisp (file).

Source

cl-getx.asd.

Parent Component

cl-getx (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-getx

Source

packages.lisp.

Use List

common-lisp.

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: pick-accessor-expansion (accessor place default-form &rest args)

This is used to choose between a function form or a value form of the place.

default-form can be a function name or "something" more complex.

Package

cl-getx.

Source

getx.lisp.

Macro: pick-setf-accessor-expansion (accessor place value default-form &rest args)
Package

cl-getx.

Source

getx.lisp.


5.1.2 Generic functions

Generic Function: digx (place &rest indicators)

Hierarchical getx. You dont really need to
create specializers based on the type of place because
digx uses getx internally and getx does the type specific work.

Examples:

> (digx (list :eish (list :huh 1)) :eish :huh)
1

> (let ((x (list :eish (list :huh 1))))
(setf (cl-getx:digx x :eish :huh) ’huh)
x)
(:EISH (:HUH HUH))

Package

cl-getx.

Source

digx.lisp.

Methods
Method: digx (place &rest indicators)
Generic Function: (setf digx) (place &rest indicators)
Package

cl-getx.

Source

digx.lisp.

Methods
Method: (setf digx) (place &rest indicators)
Generic Function: getx (place accessor &key default &allow-other-keys)

Returns the data stored in a place by name or named-accessor or concrete accessor function.

Currently places, hash-tables and plists are implemented. Methods for specific types or other lisp types can be implemented easially.

Examples:

> (getx (list :eish 1) :eish)
1

> (getx (list ’eish 1) ’eish)
1

> (getx (list ’eish 1) #’(lambda (place) (getf place ’eish)))
1

(defclass thingy () ((eish :initarg :eish :accessor eish)))
(setf x (make-instance ’thingy ’eish 1))
> (getx x ’eish)
1

**EXTREME**

Or if you really want uniform thinking and syntax for your data places
This is not a good idea if you are writing a library that others will use
some one might clobber your :eish by accident or you might clobber their :eish

(defclass thingy () ((eish :initarg :eish :accessor :eish)))
(setf x (make-instance ’thingy :eish 1))
> (getx x :eish)
1

Package

cl-getx.

Source

getx.lisp.

Methods
Method: getx ((place standard-object) accessor &key &allow-other-keys)
Method: getx ((place hash-table) accessor &key default &allow-other-keys)
Method: getx (place accessor &key &allow-other-keys)
Generic Function: (setf getx) (place accessor &key default &allow-other-keys)

Specialize as you need. plists, hash-tables and standard-object is taken care of.

Package

cl-getx.

Source

getx.lisp.

Methods
Method: (setf getx) ((place standard-object) accessor &key &allow-other-keys)

This is for use with (setf getx) of standard-objects.

Method: (setf getx) ((place hash-table) accessor &key default &allow-other-keys)

This is for use with (setf getx) of gethash.

Method: (setf getx) ((place list) accessor &key &allow-other-keys)

This is for use with (setf getx) of gethash.

Generic Function: place-exists-p (place accessor)

Returns t if the place exists. Default implementation is for plists.

Package

cl-getx.

Source

getx.lisp.

Methods
Method: place-exists-p ((place standard-object) slot-name)

This is a bit of a waste to do since gethash gives you the value and tells you if the key is not found, but its here for completeness.

Method: place-exists-p ((place hash-table) key)

This is a bit of a waste to do since gethash gives you the value and tells you if the key is not found, but its here for completeness.

Method: place-exists-p (place accessor)

5.2 Internals


5.2.1 Ordinary functions

Function: dig-down (place indicators)
Package

cl-getx.

Source

digx.lisp.

Function: set-dig-down (place indicators value)
Package

cl-getx.

Source

digx.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
D   F   G   M   P   S  
Index Entry  Section

(
(setf digx): Public generic functions
(setf digx): Public generic functions
(setf getx): Public generic functions
(setf getx): Public generic functions
(setf getx): Public generic functions
(setf getx): Public generic functions

D
dig-down: Private ordinary functions
digx: Public generic functions
digx: Public generic functions

F
Function, dig-down: Private ordinary functions
Function, set-dig-down: Private ordinary functions

G
Generic Function, (setf digx): Public generic functions
Generic Function, (setf getx): Public generic functions
Generic Function, digx: Public generic functions
Generic Function, getx: Public generic functions
Generic Function, place-exists-p: Public generic functions
getx: Public generic functions
getx: Public generic functions
getx: Public generic functions
getx: Public generic functions

M
Macro, pick-accessor-expansion: Public macros
Macro, pick-setf-accessor-expansion: Public macros
Method, (setf digx): Public generic functions
Method, (setf getx): Public generic functions
Method, (setf getx): Public generic functions
Method, (setf getx): Public generic functions
Method, digx: Public generic functions
Method, getx: Public generic functions
Method, getx: Public generic functions
Method, getx: Public generic functions
Method, place-exists-p: Public generic functions
Method, place-exists-p: Public generic functions
Method, place-exists-p: Public generic functions

P
pick-accessor-expansion: Public macros
pick-setf-accessor-expansion: Public macros
place-exists-p: Public generic functions
place-exists-p: Public generic functions
place-exists-p: Public generic functions
place-exists-p: Public generic functions

S
set-dig-down: Private ordinary functions


A.3 Variables