1 #ifndef CLIB_BTREE_PROTOS_H
    2 #define CLIB_BTREE_PROTOS_H
    3 
    4 /*
    5 	btree C prototypes
    6 
    7 	Copyright © 2002 The MorphOS Development Team, All Rights Reserved.
    8 */
    9 
   10 #ifndef EXEC_TYPES_H
   11 # include <exec/types.h>
   12 #endif
   13 
   14 #ifndef LIBRARIES_BTREE_H
   15 # include <libraries/btree.h>
   16 #endif
   17 
   18 
   19 #ifdef __cplusplus
   20 extern "C" {
   21 #endif /* __cplusplus */
   22 
   23 APTR CreateTree(ULONG Type, const struct BTArgArray *argArray);
   24 void DeleteTree(APTR Tree);
   25 APTR InsertTreeNode(APTR Tree, const APTR Key, const APTR Data);
   26 void DeleteTreeNode(APTR Tree, APTR Node);
   27 APTR GetTreeNodeKey(const APTR Tree, const APTR Node);
   28 APTR GetTreeNodeData(const APTR Tree, const APTR Node);
   29 APTR SuccTreeNode(const APTR Tree, const APTR Node);
   30 APTR PredTreeNode(const APTR Tree, const APTR Node);
   31 APTR MinTreeNode(const APTR Tree);
   32 APTR MaxTreeNode(const APTR Tree);
   33 APTR FindTreeNodeByKey(const APTR Tree, const APTR Key);
   34 APTR FindTreeNodeByData(const APTR Tree, const APTR Data);
   35 ULONG ForTreeNodes(const APTR Tree,
   36                    void (*nodeFunc)(APTR userData, const APTR Node), const APTR userData);
   37 ULONG EnumTreeNodes(const APTR Tree, const APTR lowKey, const APTR highKey,
   38                     LONG (*nodeFunc)(APTR userData, const APTR Node), const APTR userData);
   39 ULONG GetTreeSize(const APTR Tree);
   40 ULONG GetTreeHeight(const APTR Tree);
   41 void FlushTree(APTR Tree);
   42 APTR SetTreeNodeData(const APTR Tree, APTR Node, const APTR NewData);
   43 
   44 #ifdef __cplusplus
   45 }
   46 #endif /* __cplusplus */
   47 
   48 
   49 #endif /* CLIB_BTREE_PROTOS_H */