libUTL++
RBtree.h
1 #pragma once
2 
4 
5 #include <libutl/BinTree.h>
6 #include <libutl/RBtreeNode.h>
7 
9 
10 UTL_NS_BEGIN;
11 
13 
35 
37 class RBtree : public BinTree
38 {
40 
41 public:
48  RBtree(bool owner, bool multiSet = false, Ordering* ordering = nullptr);
49 
50  virtual void steal(Object& rhs);
51 
52  virtual size_t innerAllocatedSize() const;
53 
55  virtual void clear();
56 
57 protected:
58  virtual BinTreeNode* createNode(const Object* object);
59  virtual void resetRoot();
60  RBtreeNode _leaf;
61 
62 private:
63  void init();
64  void
65  deInit()
66  {
67  }
68 };
69 
71 
72 UTL_NS_END;
73 
75 
76 #include <libutl/TRBtree.h>
Binary tree abstraction.
Definition: BinTree.h:33
void deInit()
De-initialize UTL++.
Object comparison abstraction.
Definition: Ordering.h:30
#define UTL_CLASS_DECL(DC, BC)
Declaration of standard UTL++ functionality for a non-template class.
Definition: macros.h:688
Red/black tree.
Definition: RBtree.h:37
Binary tree node.
Definition: BinTreeNode.h:31
Root of UTL++ class hierarchy.
Definition: Object.h:52
void init()
Initialize UTL++.
Red/black tree node.
Definition: RBtreeNode.h:29