0029151: GCC 7.1 warnings "this statement may fall through" [-Wimplicit-fallthrough=]
[occt.git] / src / NCollection / NCollection_UBTree.hxx
index dc2254e..f8c12d0 100644 (file)
 
 template <class TheObjType, class TheBndType> class NCollection_UBTree
 {
- public:
+public:
+  //! Memory allocation
+  DEFINE_STANDARD_ALLOC
+  DEFINE_NCOLLECTION_ALLOC
+
+public:
   // ---------- PUBLIC TYPES ----------
 
   /**
@@ -209,7 +214,7 @@ template <class TheObjType, class TheBndType> class NCollection_UBTree
      * This method should be used instead of operator delete.
      */ 
     static void delNode (TreeNode * theNode,
-                         Handle(NCollection_BaseAllocator)& theAlloc)
+                         const Handle(NCollection_BaseAllocator)& theAlloc)
     {
       if (theNode) {
         if (theNode -> myChildren) {
@@ -439,7 +444,7 @@ Standard_Integer NCollection_UBTree<TheObjType,TheBndType>::Select
  * _HUBTREE      - the desired name of handled class
  * _OBJTYPE      - the name of the object type
  * _BNDTYPE      - the name of the bounding box type
- * _HPARENT      - the name of parent class (usually MMgt_TShared)
+ * _HPARENT      - the name of parent class (usually Standard_Transient)
  */
 #define DEFINE_HUBTREE(_HUBTREE, _OBJTYPE, _BNDTYPE, _HPARENT)          \
 class _HUBTREE : public _HPARENT                                        \
@@ -449,7 +454,7 @@ class _HUBTREE : public _HPARENT                                        \
                                                                         \
   _HUBTREE () : myTree(new UBTree) {}                                   \
   /* Empty constructor */                                               \
-  _HUBTREE (const Handle_NCollection_BaseAllocator& theAlloc)           \
+  _HUBTREE (const Handle(NCollection_BaseAllocator)& theAlloc)           \
      : myTree(new UBTree(theAlloc)) {}                                  \
   /* Constructor */                                                     \
                                                                         \
@@ -477,7 +482,7 @@ class _HUBTREE : public _HPARENT                                        \
   ~_HUBTREE () { delete myTree; }                                       \
   /* Destructor */                                                      \
                                                                         \
-  DEFINE_STANDARD_RTTI (_HUBTREE)                                       \
+  DEFINE_STANDARD_RTTI_INLINE(_HUBTREE,_HPARENT)                                       \
   /* Type management */                                                 \
                                                                         \
  private:                                                               \
@@ -491,8 +496,8 @@ class _HUBTREE : public _HPARENT                                        \
 };                                                                      \
 DEFINE_STANDARD_HANDLE (_HUBTREE, _HPARENT)
 
-#define IMPLEMENT_HUBTREE(_HUBTREE, _HPARENT)                           \
-IMPLEMENT_STANDARD_HANDLE (_HUBTREE, _HPARENT)                          \
-IMPLEMENT_STANDARD_RTTIEXT(_HUBTREE, _HPARENT)
+#define IMPLEMENT_HUBTREE(_HUBTREE, _HPARENT)                           
+
+
 
 #endif