Authors
- Generated by rh
-
- Declared in:
- SimpleTree.h
A simple, abstract tree class
Instance Variables
Method summary
- (unsigned)
count;
count the number of nodes in the tree
- (void)
dealloc;
releases all nodes held by the tree, then deallocate tree memor
- (NSEnumerator*)
objectEnumerator;
returns the default enumerator of the tree.
- (id)
releaseTreeNodes;
releases all nodes within the tree.
- (id)
root;
returns the root node of the tree.
- (id)
setRoot: (id)newRoot;
Replace the whole tree with a new root node
Instance Variables for SimpleTree Class
@protected id root;
the root node of the tree
- Declared in:
- SimpleTree.h
An object enumerator for the SimpleTree class This is an abstract class, subclasses will need to implement actual enumerators.
Instance Variables
Method summary
- (id)
advance;
advance to the next object within the tree. This method is a stub that needs to be overridden by a concrete sub class
- (void)
autoreleaseNode;
release the currently held node to the Autorelease Pool
- (void)
dealloc;
release the current tree reference held by the enumerator and deallocate the TreeEnumerator
- (id)
initWithTree: (
SimpleTree*)newTree;
Initialises the enumerator with a given tree.
- (id)
nextObject;
returns the next, enumerated object
- (id)
setFirstChild: (id)object;
set the first child for the enumerator This method is a stub that needs to be overridden by a concrete sub class
- (id)
setLastChild: (id)object;
set the last child for the enumerator This method is a stub that needs to be overridden by a concrete sub class
- (id)
setTree: (
SimpleTree*)newTree;
replaces the tree held by the enumerator with a new tree
Instance Variables for TreeEnumerator Class
@protected id currentNode;
the current node
@protected id nextNode;
the next node
@protected SimpleTree* tree;
the tree to enumerate