Functions



DSTree


public:

DSTree (     int nodes=1 );
Discussion

Creates a new empty Tree.


close


public:

void close (void);
Discussion

Purges all data and nodes from the tree, resulting in an empty tree. Data is cleaned according to the flags used when it was inserted.


getElement


public:

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

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.

Parameter Descriptions
path
Specifies an array of ints corresponding to the path to use to locate this element in the tree.
npathelements
Specifies the number of nodes in path.
function result
A pointer to the TreeElement at the specified path.

getInt


public:

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

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

Parameter Descriptions
path
Specifies an array of ints corresponding to the path to use to locate this element in the tree.
npathelements
Specifies the number of nodes in path.
function result
The data at the specified path.

getValue


public:

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

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.

Parameter Descriptions
path
Specifies an array of ints corresponding to the path to use to locate this element in the tree.
npathelements
Specifies the number of nodes in path.
function result
A pointer to the data at the specified path.

insert


public:

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

Inserts a new TreeElement into the Tree.

Parameter Descriptions
path
Specifies an array of ints corresponding to the path to use to locate this element in the tree.
npathelements
Specifies the number of nodes in path.
le
Specifies the TreeElement to be added to the tree.
function result
Returns TRUE if the addition succeeded, FALSE if an element already exists at the desired location.

insert


public:

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

Inserts the data into the Tree.

Parameter Descriptions
path
Specifies an array of ints corresponding to the path to use to locate this element in the tree.
npathelements
Specifies the number of nodes in path.
data
Specifies the data to be added to the tree.
cleanup
Specifies the flags controlling how the data should be cleaned up. See the TreeElement class for more information.
function result
Returns TRUE if the addition succeeded, FALSE if an element already exists at the desired location.

insert


public:

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

Inserts the data into the Tree.

Parameter Descriptions
path
Specifies an array of ints corresponding to the path to use to locate this element in the tree.
npathelements
Specifies the number of nodes in path.
data
Specifies the data to be added to the tree.
cleanup
Specifies the flags controlling how the data should be cleaned up. See the TreeElement class for more information.
function result
Returns TRUE if the addition succeeded, FALSE if an element already exists at the desired location.

~DSTree


public:

~DSTree (void);
Discussion

Destroys a Tree.

(Last Updated 9/24/2004)