Release 1.0  Copyright ã1993, 1994 by Don Yacktman.  All Rights Reserved.

MiscTree

Inherits From:	Object

Declared In:	misckit/MiscTree.h

Class Description

The MiscTree implements a tree data structure.  Each MiscTree contains a List object which points to the branch objects, which should be other MiscTree objects.  You can create a new node for the tree using ±alloc and ±init and you can assign a label to the node when you initialize it with the ±initLabel: and ±initLabelString: methods.  To add a branch object, simply use the ±addbranch: method.  If you need to manipulate the branches in some way, you can obtain the List object containing the branches via the ±branches method.  The ±depth and ±width methods return the depth and width of the tree below the messaged node.

Each node in the tree can have a label and a value, both of which are arbitrary character strings.  You can set and retrieve the character strings with the ±label, ±value, ±setLabel:, and ±setValue: methods.

The tree may be dumped to an NXStream, with all its branches, by using the ±dumpTree:level:indent method.  You can avoid having the branches below a MiscTree node printed when dumping the tree by collapsing the node.  Use ±collapse to collapse the node and ±uncollapse to uncollapse it.  The ±collapsed method will tell you if a particular node is collapsed.  If you wish to exert more specific control over whether or not a node will be dumped, you can override the ±moreData:level:indent: method to add the required functionality.  Overriding this method also allows you to add extra text to a node's line when a node is being dumped.

Note that this documentation is incomplete.  It will be finished soon.

Method Types

Initializing the MiscTree	± init
	± initLabel:
	± initLabelString:

Dealing with branches	± addBranch:
	± branches
	± depth
	± width

Labels and node values	± label
	± setLabel:
	± setValue:
	± value

Printing	± collapse
	± collapsed
	± dumpTree:level:indent:
	± moreData:level:indent:
	± uncollapse

Instance Methods

x
- x:(x)x

x.  Returns self.

See also:  -x:

x
- x:(x)x

x.  Returns self.

See also:  -x: