Functions



DSBinaryTree

	public:

DSBinaryTree();

Creates a new empty binary tree.


getElement

	public:

DSTreeElement * getElement(unsigned int path, int npathelements);

Returns a pointer to the TreeElement at the specified path, or NULL if no such element exists. Remember, this is a pointer to internal data in the tree, so modifying its contents is modifying the tree.

Parameters

NameDescription
pathSpecifies an array of ints corresponding to the path to use to locate this element in the tree.
npathelementsSpecifies the number of nodes in path.
Result: A pointer to the TreeElement at the specified path.

getInt

	public:

unsigned int getInt(unsigned int path, int npathelements);

Returns the numeric data value at the specified path, or 0 if no such element exists.

Parameters

NameDescription
pathSpecifies a set of bits corresponding to the path to use to locate this element in the tree.
npathelementsSpecifies the number of nodes in path.
Result: The data at the specified path.

getValue

	public:

void * getValue(unsigned int path, int npathelements);

Returns the pointer data value at the specified path, or NULL if no such element exists. Remember, this is a pointer to internal data in the tree, so modifying its contents is modifying the tree.

Parameters

NameDescription
pathSpecifies a set of bits corresponding to the path to use to locate this element in the tree.
npathelementsSpecifies the number of nodes in path.
Result: A pointer to the data at the specified path.

insert

	public:

BOOL insert(unsigned int path, int npathelements, DSTreeElement * te);

Inserts a new TreeElement into the Tree.

Parameters

NameDescription
pathSpecifies a set of bits corresponding to the path to use to locate this element in the tree.
npathelementsSpecifies the number of nodes in path.
leSpecifies the TreeElement to be added to the tree.
Result: Returns TRUE if the addition succeeded, FALSE if an element already exists at the desired location.

insert

	public:

BOOL insert(unsigned int path, int npathelements, void * data, int cleanup=0);

Inserts the data into the Tree.

Parameters

NameDescription
pathSpecifies a set of bits corresponding to the path to use to locate this element in the tree.
npathelementsSpecifies the number of nodes in path.
dataSpecifies the data to be added to the tree.
cleanupSpecifies the flags controlling how the data should be cleaned up. See the TreeElement class for more information.
Result: Returns TRUE if the addition succeeded, FALSE if an element already exists at the desired location.

insert

	public:

BOOL insert(unsigned int path, int npathelements, unsigned int data, int cleanup=0);

Inserts the data into the Tree.

Parameters

NameDescription
pathSpecifies a set of bits corresponding to the path to use to locate this element in the tree.
dataSpecifies the data to be added to the tree.
cleanupSpecifies the flags controlling how the data should be cleaned up. See the TreeElement class for more information.
Result: Returns TRUE if the addition succeeded, FALSE if an element already exists at the desired location.

~DSBinaryTree

	public:

~DSBinaryTree();

Destroys a Binary Tree.


Generated with HeaderDoc - © 2000 Apple Computer, Inc. — (Last Updated 5/10/2004)