- Inherits from:
- Object
- Declared in:
- DTree.h
Object
|
+---DTree
Class Description
The tree class implements a n-tree collection. It stores objects in a
tree of nodes. Because there is no key or index available to store and
remove the objects, the objects can only be stored, inserted and removed
by the tree iterator: class DTreeIterator.
- Direct subclasses:
- DXMLTree
- Last modified:
- 23-Jul-2006 (DTree.h)
Instance Variables
- private DTreeNode *_root
- the root of the tree
- private long _length
- the number of nodes in the tree
- Constructors
- - (DTree *) init
- Initialise an empty tree
- Returns:
- the object
- Copy related methods
- - deepen
- Deepen a copied tree object
- Returns:
- the object
- - shallowCopy
- Do a shallow copy of the tree object
- Returns:
- the object
- Deconstructor
- - free
- (Deep) free the object (including the stored objects)
- Returns:
- the object
- - shallowFree
- Free the object (without the stored objects)
- Returns:
- the object
- Member methods
- - (BOOL) isEmpty
- Check if the tree is empty
- Returns:
- is it
- - (long) length
- Return the number of objects in the tree
- Returns:
- the number of objects
- Collection methods
- - (long) count :(id) obj
- Count the number of occurences of an object
- Parameters:
- obj - the object to be counted
- Returns:
- the number of occurences
- - (DTree *) each :(SEL) sel
- Perform a method for each object in the tree
- Parameters:
- sel - the selector
- Returns:
- the object
- - (BOOL) has :(id) obj
- Check if the collection has a certain object
- Parameters:
- obj - the object to be found
- Returns:
- has it ?
generated 25-Jul-2006 by ObjcDoc 3.0.0