The cl-naive-ptrees Reference Manual

This is the cl-naive-ptrees Reference Manual, version 2021.6.25, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:11:37 2024 GMT+0.

Table of Contents


1 Systems

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


1.1 cl-naive-ptrees

Functions to make it easier to work with plist(s) and plist trees. Works with plist(s) pairs as units and not as individual list items.

Author

Phil Marneweck <>

License

MIT

Version

2021.6.25

Source

cl-naive-ptrees.asd.

Child Components

2 Files

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


2.1 Lisp


2.1.1 cl-naive-ptrees/cl-naive-ptrees.asd

Source

cl-naive-ptrees.asd.

Parent Component

cl-naive-ptrees (system).

ASDF Systems

cl-naive-ptrees.


2.1.2 cl-naive-ptrees/src/package.lisp

Source

cl-naive-ptrees.asd.

Parent Component

cl-naive-ptrees (system).

Packages

cl-naive-ptrees.


2.1.3 cl-naive-ptrees/src/naive-ptrees.lisp

Dependency

src/package.lisp (file).

Source

cl-naive-ptrees.asd.

Parent Component

cl-naive-ptrees (system).

Public Interface
Internals

3 Packages

Packages are listed by definition order.


3.1 cl-naive-ptrees

Source

src/package.lisp.

Use List

common-lisp.

Public Interface
Internals

4 Definitions

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


4.1 Public Interface


4.1.1 Ordinary functions

Function: append-attribute (criteria plist-tree indicator value &key nth start end)

Selects plists in PLIST-TREE matching the criteria.
If NTH is given, then only the NTH plist is modified, otherwise only the plists between START and END are modified. Appends an attribute to selected plists.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: append-attribute-value (criteria plist-tree indicator value &key nth start end)

Selects plists in PLIST-TREE matching the criteria.
If NTH is given, then only the NTH plist is modified,
otherwise only the plists between START and END are modified.
The VALUE is appended to the value of the attribute indicated by INDICATOR.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: criteriap (object)
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: indicatorp (object)
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: map-attributes (plist-tree attribute-func)

Traverses the plist tree and calls the attribute-func for each attribute pair and uses the values returned from the attribute-func to build a new plist-tree.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: map-criteria (criteria plist-tree attribute-func)

Traverses the plist-tree and calls the attribute-func for each attribute pair in plists that matches the criteria and uses the values returned from the attribute-func to build a new plist-tree. Pairs that are not affected by attribute-func are used as they are to build the new/changed tree.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: map-plists (plist-tree plist-fun)

Walk the PLIST-TREE, and call PLIST-FUN on each plist in the tree, building a similar tree with the results of PLIST-FUN.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: pathp (object)
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: plist-to-attributes (plist)

Returns a list of key value pair lists of a plist.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: plist-to-keys (plist)

Returns the keys of a plist as a list.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: plist-to-values (plist)

Returns the values of a plist as a list.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: plistp (object)
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: proper-list-p (object)

Return whether OBJECT is a proper list.
NOTE: terminates with any kind of list, dotted, or circular.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: query (plist-tree criteria)

Return a list of plists or values in the PLIST-TREE that match the CRITERIA.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: remove-attribute (criteria plist-tree indicator &key nth start end)

Selects plists in PLIST-TREE matching the criteria.
If NTH is given, then only the NTH plist is modified, otherwise only the plists between START and END are modified. Removes the attribute from the selected plists.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: traverse-attributes (plist-tree attribute-func)

Traverses the plist-tree and calls the attribute-func for each attribute pair.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: traverse-criteria (criteria plist-tree attribute-func)

Traverses the plist-tree and calls the attribute-func for each attribute pair that matches the criteria supplied. The criteria selects plists in the plist-tree. The ATTRIBUTE-FUNC is called one each attribute of each selected plist.

Note: all the attribute in the criteria are matched into a single plist, to select it.

An item in the criteria can be specific like (:att "x") which will match all attribute with name = :att and value = "x". Or the item in the criteria can be non specific (:att) which will match all attributes with then name :att.
Specific and non specific criteria elements can be mixed like ((:att "x") (:other-att))

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: traverse-plists (plist-tree plist-fun)

Walk the PLIST-TREE, and call PLIST-FUN on each plist in the tree. Return the plist-tree.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: update-attribute (criteria plist-tree indicator value &key nth start end)

Selects plists in PLIST-TREE matching the criteria.
If NTH is given, then only the NTH plist is modified, otherwise only the plists between START and END are modified. Changes the value of attribute for attributes matched by criteria.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: walk-to-node (plist-tree path)
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.


4.1.2 Generic functions

Generic Reader: indicator-absent-indicator (condition)
Package

cl-naive-ptrees.

Methods
Reader Method: indicator-absent-indicator ((condition indicator-absent-error))
Source

src/naive-ptrees.lisp.

Target Slot

indicator.

Generic Reader: indicator-absent-plist (condition)
Package

cl-naive-ptrees.

Methods
Reader Method: indicator-absent-plist ((condition indicator-absent-error))
Source

src/naive-ptrees.lisp.

Target Slot

plist.


4.1.3 Conditions

Condition: indicator-absent-error
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: plist
Initargs

:plist

Readers

indicator-absent-plist.

Writers

This slot is read-only.

Slot: indicator
Initargs

:indicator

Readers

indicator-absent-indicator.

Writers

This slot is read-only.


4.1.4 Types

Type: criteria ()
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Type: indicator ()
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Type: path ()
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Type: plist ()
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Type: proper-list ()
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.


4.2 Internals


4.2.1 Special variables

Special Variable: *parse-criteria-cache*
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.


4.2.2 Macros

Macro: & (place)
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Macro: appendf (place &rest lists)
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.


4.2.3 Ordinary functions

Function: deref (place)
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: (setf deref) (place)
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: extract (sequence nth start end)
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: parse-criteria (criteria)
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: query-places (plist-tree criteria)

Return a list of plists or values in the PLIST-TREE that match the CRITERIA.

Note: If CRITERIA is a CHAIN, then it’s equivalent to:
(query-places (query plist-tree (butlast criteria))
(first (last criteria)))

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Function: traverse-plist-places (plist-tree plist-fun)

Walk the PLIST-TREE, and call PLIST-FUN with the place of each plist in the tree. Return the plist-tree.

Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.


4.2.4 Generic functions

Generic Function: attribute-equal-p (a b)
Package

cl-naive-ptrees.

Source

src/naive-ptrees.lisp.

Methods
Method: attribute-equal-p (a b)
Method: attribute-equal-p ((a number) (b number))
Method: attribute-equal-p ((a cons) (b cons))
Method: attribute-equal-p ((a string) (b string))
Method: attribute-equal-p ((a vector) (b vector))
Method: attribute-equal-p ((a array) (b array))

Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   &   (  
A   C   D   E   F   G   I   M   P   Q   R   T   U   W  
Index Entry  Section

&
&: Private macros

(
(setf deref): Private ordinary functions

A
append-attribute: Public ordinary functions
append-attribute-value: Public ordinary functions
appendf: Private macros
attribute-equal-p: Private generic functions
attribute-equal-p: Private generic functions
attribute-equal-p: Private generic functions
attribute-equal-p: Private generic functions
attribute-equal-p: Private generic functions
attribute-equal-p: Private generic functions
attribute-equal-p: Private generic functions

C
criteriap: Public ordinary functions

D
deref: Private ordinary functions

E
extract: Private ordinary functions

F
Function, (setf deref): Private ordinary functions
Function, append-attribute: Public ordinary functions
Function, append-attribute-value: Public ordinary functions
Function, criteriap: Public ordinary functions
Function, deref: Private ordinary functions
Function, extract: Private ordinary functions
Function, indicatorp: Public ordinary functions
Function, map-attributes: Public ordinary functions
Function, map-criteria: Public ordinary functions
Function, map-plists: Public ordinary functions
Function, parse-criteria: Private ordinary functions
Function, pathp: Public ordinary functions
Function, plist-to-attributes: Public ordinary functions
Function, plist-to-keys: Public ordinary functions
Function, plist-to-values: Public ordinary functions
Function, plistp: Public ordinary functions
Function, proper-list-p: Public ordinary functions
Function, query: Public ordinary functions
Function, query-places: Private ordinary functions
Function, remove-attribute: Public ordinary functions
Function, traverse-attributes: Public ordinary functions
Function, traverse-criteria: Public ordinary functions
Function, traverse-plist-places: Private ordinary functions
Function, traverse-plists: Public ordinary functions
Function, update-attribute: Public ordinary functions
Function, walk-to-node: Public ordinary functions

G
Generic Function, attribute-equal-p: Private generic functions
Generic Function, indicator-absent-indicator: Public generic functions
Generic Function, indicator-absent-plist: Public generic functions

I
indicator-absent-indicator: Public generic functions
indicator-absent-indicator: Public generic functions
indicator-absent-plist: Public generic functions
indicator-absent-plist: Public generic functions
indicatorp: Public ordinary functions

M
Macro, &: Private macros
Macro, appendf: Private macros
map-attributes: Public ordinary functions
map-criteria: Public ordinary functions
map-plists: Public ordinary functions
Method, attribute-equal-p: Private generic functions
Method, attribute-equal-p: Private generic functions
Method, attribute-equal-p: Private generic functions
Method, attribute-equal-p: Private generic functions
Method, attribute-equal-p: Private generic functions
Method, attribute-equal-p: Private generic functions
Method, indicator-absent-indicator: Public generic functions
Method, indicator-absent-plist: Public generic functions

P
parse-criteria: Private ordinary functions
pathp: Public ordinary functions
plist-to-attributes: Public ordinary functions
plist-to-keys: Public ordinary functions
plist-to-values: Public ordinary functions
plistp: Public ordinary functions
proper-list-p: Public ordinary functions

Q
query: Public ordinary functions
query-places: Private ordinary functions

R
remove-attribute: Public ordinary functions

T
traverse-attributes: Public ordinary functions
traverse-criteria: Public ordinary functions
traverse-plist-places: Private ordinary functions
traverse-plists: Public ordinary functions

U
update-attribute: Public ordinary functions

W
walk-to-node: Public ordinary functions