aatree.c File Reference

Cop-out implementation of an AA-tree. More...

#include "aatree.h"
#include <stdlib.h>
#include <assert.h>
#include "vector.h"

Include dependency graph for aatree.c:

Go to the source code of this file.


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.
static void treeExit (void)


AANode aaTerminatorNode
 The node used to indicate that a particular branch is empty.
static Vector copout = { NULL, NULL, NULL, sizeof(AANode), 0, 0, 16 }
static Bool setExit = 0

Detailed Description

Cop-out implementation of an AA-tree.

Really a static vector; use until the real tree is fixed. Maintains the same tree interface as the original tree.

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.c.

Function Documentation

static void treeExit ( void   )  [static]

Definition at line 85 of file aatree.c.

References copout, and Vector_t::VectorDestroy().

Referenced by AATreeDestroy().

Here is the call graph for this function:

Variable Documentation

Vector copout = { NULL, NULL, NULL, sizeof(AANode), 0, 0, 16 } [static]

Definition at line 32 of file aatree.c.

Referenced by _AATreeRemove(), AATreeAdd(), AATreeDestroy(), AATreeFind(), and treeExit().

Bool setExit = 0 [static]

Definition at line 83 of file aatree.c.

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