"Fossies" - the Fresh Open Source Software Archive

Member "ncc-2.8/inttree.h" (17 May 2003, 658 Bytes) of package /linux/privat/old/ncc-2.8.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /******************************************************************************
    2     Interger Key Binary Tree.
    3     O(1)
    4 ******************************************************************************/
    5 
    6 class intNode;
    7 
    8 class intTree
    9 {
   10 friend  class intNode;
   11 static  unsigned int Query;
   12 static  intNode **FoundSlot;
   13    public:
   14     intNode *root;
   15     int cnt;
   16     intTree     ();
   17     intNode*    intFind     (unsigned int);
   18 };
   19 
   20 class intNode
   21 {
   22 friend  class intTree;
   23 friend  class foreach_intNode;
   24 friend  void enter_intNode (intNode*);
   25     void addself    (intTree*);
   26    protected:
   27     intNode *less, *more;
   28    public:
   29     unsigned int Key;
   30     intNode (intTree*);
   31     void intRemove  (intTree*);
   32     ~intNode ();
   33 };