AANode_t Struct Reference
[AA-Tree]

The node data used to track the structure of an AA-Tree. More...

#include <aatree.h>


Data Fields

union {
   void *   data
 A pointer to the arbitrary data being tracked by the tree.
   size_t   index
 An alternative to a pointer to the associated data; a value intended to be an index into an array.
}; 
AATreeKeyLevelType key
 The unique identifier for the item.
AATreeKeyLevelType level
 The item's level in the tree.


Detailed Description

The node data used to track the structure of an AA-Tree.

Definition at line 78 of file aatree.h.


Field Documentation

union { ... }

void* AANode_t::data

A pointer to the arbitrary data being tracked by the tree.

This is needed because the remove algorithm moves nodes about in a way that requires copying node data and takes advantage of the fact that other nodes still have pointers to the copied node. So without this pointer, all the data for the node would also have to be copied.

Definition at line 87 of file aatree.h.

Referenced by AddMessage(), HandleAck(), and ServiceMessages().

size_t AANode_t::index

An alternative to a pointer to the associated data; a value intended to be an index into an array.

It can safely be used in any other way.

Definition at line 92 of file aatree.h.

AATreeKeyLevelType AANode_t::key

The unique identifier for the item.

Warning:
This should be set prior to adding the item to the tree and should never be changed until after the item is removed.

Definition at line 112 of file aatree.h.

Referenced by _AATreeRemove(), AATreeAdd(), AATreeFind(), HandleAck(), and ServiceMessages().

AATreeKeyLevelType AANode_t::level

The item's level in the tree.

For internal use only.

Definition at line 106 of file aatree.h.


The documentation for this struct was generated from the following file:
Generated on Mon May 28 04:41:44 2007 for Retro Tank Super Attack by  doxygen 1.5.2