taskrambler
v0.1.8
Web server and task management solution.
|
#include "class.h"
Go to the source code of this file.
Macros | |
#define | TREE_RIGHT(node) (NULL!=(node)?(node)->right:NULL) |
#define | TREE_LEFT(node) (NULL!=(node)?(node)->left:NULL) |
#define | TREE_PARENT(node) (NULL!=(node)?(node)->parent:NULL) |
#define | TREE_CHILD(node) (NULL==TREE_RIGHT((node))?TREE_LEFT((node)):TREE_RIGHT((node))) |
#define | TREE_RIGHT_LEFT(node) (NULL!=TREE_RIGHT((node))?TREE_LEFT(TREE_RIGHT((node))):NULL) |
#define | TREE_LEFT_RIGHT(node) (NULL!=TREE_LEFT((node))?TREE_RIGHT(TREE_LEFT((node))):NULL) |
#define | TREE_SIBLING(node) |
#define | TREE_GRANDPARENT(node) (NULL!=TREE_PARENT((node))?TREE_PARENT((node))->parent:NULL) |
#define | TREE_UNCLE(node) |
#define | TREE_ROTATE_LEFT(root, node) |
#define | TREE_ROTATE_RIGHT(root, node) |
#define | TREE_REPLACE_NODE(root, node1, node2) |
Typedefs | |
typedef int(* | TreeComp) (const void *, const void *) |
typedef void(* | TreeAction) (const void *, const int) |
Enumerations | |
enum | rbColor { rbBlack =1, rbRed =2, rbBlack =1, rbRed =2 } |
Functions | |
CLASS (Tree) | |
void * | treeFind (Tree, const void *, TreeComp) |
void * | treeInsert (Tree *, const void *, TreeComp) |
void * | treeDelete (Tree *, const void *, TreeComp) |
void | treeWalk (Tree, TreeAction) |
void | treeDestroy (Tree *, TreeAction) |
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 3 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, see http://www.gnu.org/licenses/.
Definition in file tree.h.
#define TREE_CHILD | ( | node | ) | (NULL==TREE_RIGHT((node))?TREE_LEFT((node)):TREE_RIGHT((node))) |
Definition at line 32 of file tree.h.
Referenced by treeDelete().
#define TREE_GRANDPARENT | ( | node | ) | (NULL!=TREE_PARENT((node))?TREE_PARENT((node))->parent:NULL) |
Definition at line 48 of file tree.h.
Referenced by treeInsert().
#define TREE_LEFT | ( | node | ) | (NULL!=(node)?(node)->left:NULL) |
Definition at line 29 of file tree.h.
Referenced by inOrderSuccessor(), treeDelete(), treeDestroy(), treeFind(), treeInsert(), treeRotateRight(), and treeWalk().
#define TREE_LEFT_RIGHT | ( | node | ) | (NULL!=TREE_LEFT((node))?TREE_RIGHT(TREE_LEFT((node))):NULL) |
Definition at line 38 of file tree.h.
Referenced by treeRotateRight().
#define TREE_PARENT | ( | node | ) | (NULL!=(node)?(node)->parent:NULL) |
Definition at line 30 of file tree.h.
Referenced by treeDelete(), treeDestroy(), treeInsert(), treeRotateLeft(), treeRotateRight(), and treeWalk().
#define TREE_REPLACE_NODE | ( | root, | |
node1, | |||
node2 | |||
) |
Definition at line 98 of file tree.h.
Referenced by treeDelete().
#define TREE_RIGHT | ( | node | ) | (NULL!=(node)?(node)->right:NULL) |
Definition at line 28 of file tree.h.
Referenced by inOrderSuccessor(), treeDelete(), treeDestroy(), treeFind(), treeInsert(), treeRotateLeft(), and treeWalk().
#define TREE_RIGHT_LEFT | ( | node | ) | (NULL!=TREE_RIGHT((node))?TREE_LEFT(TREE_RIGHT((node))):NULL) |
Definition at line 35 of file tree.h.
Referenced by treeRotateLeft().
#define TREE_ROTATE_LEFT | ( | root, | |
node | |||
) |
#define TREE_ROTATE_RIGHT | ( | root, | |
node | |||
) |
#define TREE_SIBLING | ( | node | ) |
Definition at line 41 of file tree.h.
Referenced by treeDelete().
#define TREE_UNCLE | ( | node | ) |
Definition at line 51 of file tree.h.
Referenced by treeInsert().
enum rbColor |
void* treeDelete | ( | Tree * | , |
const void * | , | ||
TreeComp | |||
) |
Definition at line 31 of file tree/delete.c.
References comp(), inOrderSuccessor(), rbBlack, rbRed, TREE_CHILD, TREE_LEFT, TREE_PARENT, TREE_REPLACE_NODE, TREE_RIGHT, TREE_SIBLING, treeRotateLeft(), and treeRotateRight().
Referenced by hashDelete(), hashDeleteByVal(), and main().
void treeDestroy | ( | Tree * | , |
TreeAction | |||
) |
Definition at line 26 of file destroy.c.
References TREE_LEFT, TREE_PARENT, and TREE_RIGHT.
Referenced by hashCleanup(), and main().
void* treeFind | ( | Tree | , |
const void * | , | ||
TreeComp | |||
) |
Definition at line 26 of file find.c.
References comp(), TREE_LEFT, and TREE_RIGHT.
Referenced by hashGet(), hashGetByVal(), and main().
void* treeInsert | ( | Tree * | , |
const void * | , | ||
TreeComp | |||
) |
Definition at line 29 of file insert.c.
References comp(), rbBlack, rbRed, TREE_GRANDPARENT, TREE_LEFT, TREE_PARENT, TREE_RIGHT, TREE_UNCLE, treeRotateLeft(), and treeRotateRight().
Referenced by hashAdd(), and main().
void treeWalk | ( | Tree | , |
TreeAction | |||
) |
Definition at line 26 of file walk.c.
References TREE_LEFT, TREE_PARENT, and TREE_RIGHT.
Referenced by hashEach(), and main().