source: project/release/3/proplist/proplist.html

Last change on this file was 6234, checked in by Kon Lovett, 13 years ago

Saved regened html.

File size: 10.6 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<!-- Generated by eggdoc Revision: 1.20  -->
3<html>
4<head>
5<title>Eggs Unlimited - proplist</title><style type="text/css"> <!--
6      CODE {
7            color: #666666;
8          }
9/*   DT.definition EM { font-weight: bold; font-style: normal; } */
10
11     DT.definition { 
12                   background: #eee;
13                   color: black;
14                   padding: 0.2em 1em 0.2em 0.7em;
15                   margin-left: 0.2em;
16border: 1px solid #bbc;
17                   font-family: "Andale Mono", monospace;
18                   /* font-size: 1.2em; */
19                   
20                 }
21     DD {
22                   margin-top: 0.8em;
23                   margin-bottom: 0.8em;
24     }
25     DIV.subsection {
26                    border-top: 1px solid #448;
27                    padding-left: 1em;
28                    margin-bottom: 1.2em;
29     }
30     DIV.subsubsection {
31                    border-top: 1px dotted #99c;
32                    /* border-left: 1px solid #99c; */
33                    padding-left: 1em;
34                    margin-bottom: 1.2em;
35     }
36     DIV.subsubsubsection {
37                    border-top: 1px solid #ddf;
38                    padding-left: 1em;
39                    margin-bottom: 1.2em;
40     }
41
42         DIV.section {
43                 margin-bottom: 1.5em;
44         }
45         a:link {
46                 color: #336;
47         }
48         a:visited { color: #666; }
49         a:active  { color: #966; }
50         a:hover   { color: #669; }
51         body { margin: 0; padding: 0; background: #fff; color: #000; font: 9pt "Lucida Grande", "Verdana", sans-serif; }
52         H2 {
53                 background: #336;
54                 color: #fff;
55                 padding-top: 0.5em;
56                 padding-bottom: 0.5em;
57                 padding-left: 16px;
58                 margin: 0 0 1em 0;
59        }
60        UL LI {
61                list-style: none;
62        }
63        TT {
64                font-family: "Andale Mono", monospace;
65                /* font-size: 1.2em; */
66        }
67        H3 {
68                color: #113;
69                margin-bottom: 0.5em;
70        }
71        H4, H5, H6 {
72                color: #113;
73                margin-bottom: 1.0em;
74        }
75        H5 {
76                font-weight: normal;
77                font-style: italic;
78                font-size: 100%;
79                margin-top: 1.2em;
80        }
81        H6 {
82                font-weight: bold;
83                font-size: 85%;
84                margin-top: 1.2em;
85        }
86     DIV#eggheader {
87         text-align: center;
88                 float: right;
89                 margin-right: 2em;
90     }
91     DIV#header IMG {
92            /* display: block; margin-left: auto; margin-right: auto;  */
93            /* float: right; */
94            border: none;  /* firefox */
95     }
96     DIV#footer {
97                background: #bbd;
98                padding: 0.7em ;
99                border-top: 1px solid #cce;
100     }
101     DIV#footer hr {
102                display: none;
103     }
104     DIV#footer a {
105                float: left;
106     }
107     DIV#revision-history {
108         float: right;
109     }
110     
111     DIV#body {
112                 margin: 1em 1em 1em 16px;
113         }
114
115     DIV#examples PRE {
116       background: #eef;
117       padding: 0.1em;
118       border: 1px solid #aac;
119     }
120     PRE#license, DIV#examples PRE {
121       padding: 0.5em;
122     }
123     DIV#examples PRE {
124       /* font-size: 85%; */
125     }
126     PRE { font-family: "Andale Mono", monospace; }
127     TABLE {
128       background: #eef;
129       padding: 0.2em;
130       border: 1px solid #aac;
131       border-collapse: collapse;
132       width: 100%;
133     }
134     TABLE.symbol-table TD.symbol {
135          width: 15em;
136          font-family: "Andale Mono", monospace;
137          /* font-size: 1.2em; */
138     }
139     TH {
140       text-align: left;
141       border-bottom: 1px solid #aac;
142       padding: 0.25em 0.5em 0.25em 0.5em;
143     } 
144     TD { padding: 0.25em 0.5em 0.25em 0.5em; }
145     --></style></head>
146<body>
147<div id="header">
148<h2>proplist</h2>
149<div id="eggheader"><a href="index.html">
150<img src="egg.jpg" alt="[Picture of an egg]" /></a></div></div>
151<div id="body">
152<div class="section">
153<h3>Description</h3>
154<p>Provides property list operations.</p></div>
155<div class="section">
156<h3>Author</h3><a href="mailto:klovett@pacbell.net">Kon Lovett</a></div>
157<div class="section">
158<h3>Version</h3>
159<ul>
160<li>1.7 Last version - superseded by Chicken 2.7113 built-in support.</li>
161<li>1.6 Equal &amp; Member Procedure Procedure Parameters</li>
162<li>1.5 Procedure slot support</li>
163<li>1.4 Extra symbol slot support</li>
164<li>1.3 Renamed get-properties, removed rem-properties[/all]!</li>
165<li>1.2 Exports</li>
166<li>1.1 &quot;Real&quot; property list</li>
167<li>1.0 Initial release</li></ul></div>
168<div class="section">
169<h3>Usage</h3><tt>(require-extension proplist)</tt></div>
170<div class="section">
171<h3>Download</h3><a href="proplist.egg">proplist.egg</a></div>
172<div class="section">
173<h3>Documentation</h3>
174<p>Proplist is a Lisp inspired set of procedures supporting property list operations. A property list is a list of key-value pairs arranged along the top-level spine of the list.</p>
175<p>A property list vs. an association list: PROPLIST - (key1 val1 key2 val2) ALIST - ((key1 val1) (key2 val2)).</p>
176<p>A <tt>HANDLE</tt> may be a procedure, symbol, hash-table, or a property-list. See the <code>proplist-extraslot</code> and <code>proplist-procslot</code> parameters for Lisp-like property list attachment.</p>
177<p>A <tt>PROPKEY</tt> can be any Scheme object, but matching depends on the <code>proplist-equal</code> and <code>proplist-member</code> parameters.</p>
178<p>Proplist supports the pre-2.2 CHICKEN &quot;disembodied&quot; property list functionality, when the <tt>HANDLE</tt> is a hash-table. However, the original functions <code>get</code> and <code>put!</code> are not defined.</p>
179<div class="subsection">
180<h4>Property list</h4>
181<dt class="definition"><strong>procedure:</strong> (proplist-procedure PROC)</dt>
182<dd>
183<p>Returns the extended procedure with an empty property list.</p></dd>
184<dt class="definition"><strong>procedure:</strong> (getprop HANDLE PROPKEY [DEFAULT #f])</dt>
185<dd>
186<p>Returns the first property <tt>PROPKEY</tt> value of <tt>HANDLE</tt>, or the optional <tt>DEFAULT</tt>, when no such property.</p></dd>
187<dt class="definition"><strong>procedure:</strong> (putprop! HANDLE [PROPKEY VALUE ...])</dt>
188<dd>
189<p>Adds the property <tt>PROPKEY</tt> value of <tt>HANDLE</tt> to the supplied <tt>VALUE</tt>. Does not replace an existing property.</p></dd>
190<dt class="definition"><strong>procedure:</strong> (setprop! HANDLE [PROPKEY VALUE ...])</dt>
191<dd>
192<p>Sets the property <tt>PROPKEY</tt> value of <tt>HANDLE</tt> to the supplied <tt>VALUE</tt>. Replaces any existing property.</p></dd>
193<dt class="definition"><strong>procedure:</strong> (remprop! HANDLE [PROPKEY ...])</dt>
194<dd>
195<p>Removes the first property <tt>PROPKEY</tt> of <tt>HANDLE</tt>.</p></dd>
196<dt class="definition"><strong>procedure:</strong> (remprop/all! HANDLE [PROPKEY ...])</dt>
197<dd>
198<p>Removes every property <tt>PROPKEY</tt> of <tt>HANDLE</tt>.</p></dd>
199<dt class="definition"><strong>procedure:</strong> (proplist HANDLE [PROPKEY ...])</dt>
200<dd>
201<p>Returns the first property <tt>PROPKEY</tt> value of <tt>HANDLE</tt> for every property key specified, as a property list. All properties returned when no key specified.</p></dd>
202<dt class="definition"><strong>procedure:</strong> (proplist-&gt;alist HANDLE [PROPKEY ...])</dt>
203<dd>
204<p>Returns the first properties <tt>PROPKEY ...</tt> key-value pairs of <tt>HANDLE</tt> as an association list. All properties when no key specified.</p></dd>
205<dt class="definition"><strong>procedure:</strong> (proplist-&gt;alist ALIST [PROPKEY ...])</dt>
206<dd>
207<p>Returns the first properties <tt>PROPKEY ..</tt> key-value pairs of <tt>ALIST</tt> as an asscociation list. All properties when no key specified.</p></dd></div>
208<div class="subsection">
209<h4>Parameters</h4>
210<dt class="definition"><strong>parameter:</strong> (proplist-equal [PROC eq?])</dt>
211<dd>
212<p>Sets or gets the binary procedure for property key equality testing. Ignored for a hash-table.</p></dd>
213<dt class="definition"><strong>parameter:</strong> (proplist-member [PROC memq?])</dt>
214<dd>
215<p>Sets or gets the binary procedure for property key list membership testing. Ignored for a hash-table.</p></dd>
216<dt class="definition"><strong>parameter:</strong> (proplist-extraslot [FLAG])</dt>
217<dd>
218<p>The property list is sourced from the symbol extraslot when <tt>FLAG</tt> is <code>#t</code>. Should the symbol extraslot feature not be available or the <tt>FLAG</tt> is <code>#f</code> the property list is found in a hash-table.</p></dd>
219<dt class="definition"><strong>parameter:</strong> (proplist-procslot [FLAG])</dt>
220<dd>
221<p>The property list is sourced from the procedure extended data when <tt>FLAG</tt> is <code>#t</code>. Should the <tt>FLAG</tt> be <code>#f</code> the property list is found in a hash-table.</p>
222<p>The procedure <b>must</b> be initialized before using as a property list handle.</p>
223<p>Example: <code>(define foo (proplist-procedure (lambda () #t)))</code>.</p></dd></div>
224<div class="subsection">
225<h4>Property list I/O</h4>
226<p>Property list SRFI-10 support procedures.</p>
227<p>A reader-ctor is defined for the external text representation of a property list.</p>
228<dt class="definition"><strong>procedure:</strong> (print-proplist HANDLE [PORT])</dt>
229<dd>
230<p>Writes the external text representation of the property list for <tt>HANDLE</tt> to the output <tt>PORT</tt>. Port defaults to the <code>(current-output-port)</code>.</p></dd>
231<dt class="definition"><strong>procedure:</strong> (set-proplist! HANDLE PROPLIST)</dt>
232<dd>
233<p>Sets the property list for <tt>HANDLE</tt> to the supplied <tt>PROPLIST</tt>.</p>
234<p>Though not an I/O operation this procedure is considered too dangerous for regular use and buried in this section.</p></dd></div></div>
235<div class="section">
236<h3>License</h3>
237<pre>Copyright (c) 2005, Kon Lovett.  All rights reserved.
238
239Permission is hereby granted, free of charge, to any person obtaining a
240copy of this software and associated documentation files (the Software),
241to deal in the Software without restriction, including without limitation
242the rights to use, copy, modify, merge, publish, distribute, sublicense,
243and/or sell copies of the Software, and to permit persons to whom the
244Software is furnished to do so, subject to the following conditions:
245
246The above copyright notice and this permission notice shall be included
247in all copies or substantial portions of the Software.
248
249THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
250IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
251FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
252THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
253OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
254ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
255OTHER DEALINGS IN THE SOFTWARE.</pre></div></div>
256<div id="footer">
257<hr /><a href="index.html">&lt; Egg index</a>
258<div id="revision-history">$Revision$ $Date$</div>&nbsp;</div></body></html>
Note: See TracBrowser for help on using the repository browser.