This is the cl-getx Reference Manual, version 2020.7.15, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:58:23 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-getx
This is a naive, persisted, in memory (lazy loading) data store for Common Lisp.
Phil Marneweck <phil@psychedelic.co.za>
MIT
2020.7.15
packages.lisp
(file).
getx.lisp
(file).
digx.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-getx/getx.lisp
packages.lisp
(file).
cl-getx
(system).
getx
(generic function).
(setf getx)
(generic function).
pick-accessor-expansion
(macro).
pick-setf-accessor-expansion
(macro).
place-exists-p
(generic function).
cl-getx/digx.lisp
getx.lisp
(file).
cl-getx
(system).
digx
(generic function).
(setf digx)
(generic function).
dig-down
(function).
set-dig-down
(function).
Packages are listed by definition order.
cl-getx
common-lisp
.
digx
(generic function).
(setf digx)
(generic function).
getx
(generic function).
(setf getx)
(generic function).
pick-accessor-expansion
(macro).
pick-setf-accessor-expansion
(macro).
place-exists-p
(generic function).
dig-down
(function).
set-dig-down
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
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.
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))
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
Specialize as you need. plists, hash-tables and standard-object is taken care of.
standard-object
) accessor &key &allow-other-keys) ¶This is for use with (setf getx) of standard-objects.
hash-table
) accessor &key default &allow-other-keys) ¶This is for use with (setf getx) of gethash.
list
) accessor &key &allow-other-keys) ¶This is for use with (setf getx) of gethash.
Returns t if the place exists. Default implementation is for plists.
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.
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.
Jump to: | (
D F G M P S |
---|
Jump to: | (
D F G M P S |
---|
Jump to: | C D F G P S |
---|
Jump to: | C D F G P S |
---|