The multival-plist Reference Manual

This is the multival-plist Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed May 15 06:20:04 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 multival-plist

Property List stores multiple values per one key.

Author

Eitarow Fukamachi

License

LLGPL

Long Description

# Multival-Plist - Property List stores multiple values per one key.

## Usage

(defparameter *plist* ’(:foo 1 :bar 2 :foo 3))

(getf *plist* :foo)
;=> 1
(getf-all *plist* :foo)
;=> (1 3)

(remf-all *plist* :foo)
;=> T
(getf-all *plist* :foo :undef)
;=> :UNDEF

## Description

Multival-Plist provides utilities to handle Property Lists that may contain multiple values per key.

## API Reference

### [Function] getf-all (plist key &optional default)

*plist*
;=> (:FOO 1 :BAR 2 :FOO 3)
(getf *plist* :foo)
;=> 1
(getf-all *plist* :foo)
;=> (1 3)

This is a version of ‘getf‘ enabled to manage multiple keys. If the ‘plist‘ has two or more pairs that they have given ‘key‘ as a key, returns the values of each pairs as one list.

### [Function] \(setf getf-all\) (val plist key &optional default)

(setf (getf-all *plist* :foo) ’("Hello" "World"))
;; *plist* = ’(:foo "Hello" :bar 2 :foo "World")

;; same as (setf (getf-all *plist* :foo) ’(3000))
(setf (getf-all *plist* :foo) 3000)
;; *plist* = ’(:foo 3000 :bar 2)

Changes the stored value(s) of the given ‘key‘. This removes or adds pairs as necessary to store the new list.

### [Macro] remf-all (plist key)

(remf-all *plist* :foo)

Removes a key and associated values for the given ‘key‘.

## Author

* Eitarow Fukamachi (e.arrows@gmail.com)

## Copyright

Copyright (c) 2012 Eitarow Fukamachi (e.arrows@gmail.com)

# License

Licensed under the LLGPL License.

Version

0.1

Dependencies
  • cl-annot (system).
  • cl-syntax-annot (system).
  • trivial-types (system).
  • alexandria (system).
Source

multival-plist.asd.

Child Component

src (module).


3 Modules

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


3.1 multival-plist/src

Source

multival-plist.asd.

Parent Component

multival-plist (system).

Child Component

multival-plist.lisp (file).


4 Files

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


4.1 Lisp


4.1.1 multival-plist/multival-plist.asd

Source

multival-plist.asd.

Parent Component

multival-plist (system).

ASDF Systems

multival-plist.

Packages

multival-plist-asd.


4.1.2 multival-plist/src/multival-plist.lisp

Source

multival-plist.asd.

Parent Component

src (module).

Packages

multival-plist.

Public Interface

5 Packages

Packages are listed by definition order.


5.1 multival-plist-asd

Source

multival-plist.asd.

Use List
  • asdf/interface.
  • common-lisp.

5.2 multival-plist

Source

multival-plist.lisp.

Use List

common-lisp.

Public Interface

6 Definitions

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


6.1 Public Interface


6.1.1 Macros

Macro: remf-all (plist key)

Removes a key and associated values for the given ‘key’.

Package

multival-plist.

Source

multival-plist.lisp.


6.1.2 Ordinary functions

Function: getf-all (plist key &optional default)

This is a version of ‘getf’ enabled to manage multiple keys. If the ‘plist’ has two or more pairs that they have given ‘key’ as a key, returns the values of each pairs as one list.

Package

multival-plist.

Source

multival-plist.lisp.

Function: (setf getf-all) (plist key &optional default)

Changes the stored value(s) of the given ‘key’. This removes or adds pairs as necessary to store the new list.

Package

multival-plist.

Source

multival-plist.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables