Attachment "tree.n.patch" to
ticket [552972ffff]
added by
cleverly
2002-05-07 01:44:49.
*** tree.n Wed Oct 17 11:27:26 2001
--- tree-modified.n Wed Jan 16 13:01:59 2002
***************
*** 39,44 ****
--- 39,46 ----
each node.
.PP
The following commands are possible for tree objects:
+ .TP
+ \fItreeName\fR \fBappend\fR \fInode\fR ?\fI-key key\fR? \fIvalue\fR Appends a value to one of the keyed values associated with an node. If no key is specified, the key \fBdata\fR is assumed.
.TP
\fItreeName\fR \fBchildren\fR \fInode\fR
Return a list of the children of \fInode\fR.
***************
*** 65,70 ****
--- 67,83 ----
Return the value associated with the key \fIkey\fR for the node
\fInode\fR. If no key is specified, the key \fBdata\fR is assumed.
.TP
+ \fItreeName\fR \fBgetall\fR \fInode\fR
+ Returns a serialized list of key/value pairs (suitable for use with
+ \fB[array set]\fR) for the \fInode\fR.
+ .TP
+ \fItreeName\fR \fBkeys\fR \fInode\fR
+ Returns a list of keys for the \fInode\fR.
+ .TP
+ \fItreeName\fR \fBkeyexists\fR \fInode\fR ?\fI-key key\fR?
+ Return true if the specified \fIkey\fR exists for the \fInode\fR.
+ If no key is specified, the key \fBdata\fR is assumed.
+ .TP
\fItreeName \fBindex\fR \fInode\fR
Returns the index of \fInode\fR in its parent's list of children. For
example, if a node has \fBnodeFoo\fR, \fBnodeBar\fR, and \fBnodeBaz\fR as
***************
*** 92,97 ****
--- 105,114 ----
\fItreeName \fBisleaf\fR \fInode\fR
Returns true if \fInode\fR is a leaf of the tree (if \fInode\fR has no
children), false otherwise.
+ .TP
+ \fItreeName\fR \fBlappend\fR \fInode\fR ?\fI-key key\fR? \fIvalue\fR
+ Appends a value (as a list) to one of the keyed values associated with an node.
+ If no key is specified, the key \fBdata\fR is assumed.
.TP
\fItreeName\fR \fBmove\fR \fIparent\fR \fIindex\fR \fInode\fR ?\fInode ...\fR?
Make the specified nodes children of \fIparent\fR, inserting them