aatree.h File Reference

Interface to an AA-tree. More...

#include <SDL_types.h>
#include <stddef.h>

Include dependency graph for aatree.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AANode_t
 The node data used to track the structure of an AA-Tree. More...
struct  AATreeRemovalData_t
 Used by AATreeRemove() to store data used to remove items from the tree. More...

Defines

#define AA_ROOT_NODE   (&aaTerminatorNode)
 A pointer to the initial root node; if it is the root node of a tree, then the tree is empty.
#define AATreeIsEmpty(tree)   ((tree) == &aaTerminatorNode)
 Evaluates to true if the given tree is empty.
#define AATreeRemove(tree, key)
 Removes an item from the given tree.

Typedefs

typedef AANode_t AANode
typedef Uint16 AATreeKeyLevelType
 The data type used to identify the items in the AA-Tree.
typedef AATreeRemovalData_t AATreeRemovalData

Functions

AANode_AATreeRemove (AANode *tree, AATreeRemovalData *rd)
 Implements the recursive removal algorithim; removes and deallocates the node with the given key.
AANodeAATreeAdd (AANode **tree, AATreeKeyLevelType key)
 Adds a node to the indicated tree.
void AATreeDestroy (AANode *tree)
 Deallocates all AANodes that comprise a tree.
AANodeAATreeFind (AANode *tree, AATreeKeyLevelType key)
 Finds a node in the tree.

Variables

AANode aaTerminatorNode
 The node used to indicate that a particular branch is empty.


Detailed Description

Interface to an AA-tree.

Author:
Jeff Jackowski (jeffj@ro.com)
Copyright (C) 2007 Jeff Jackowski

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Or visit their website at: http://www.gnu.org/

Definition in file aatree.h.


Generated on Mon May 28 04:41:39 2007 for Retro Tank Super Attack by  doxygen 1.5.2