0025609: Clean up the duplicate classes in TKBO project
[occt.git] / src / BOPDS / BOPDS_Iterator.cxx
index d3e8058..d29b24b 100644 (file)
 
 
 #include <Bnd_Box.hxx>
-#include <BOPCol_BoxBndTree.hxx>
-#include <BOPCol_NCVector.hxx>
-#include <BOPCol_Parallel.hxx>
 #include <BOPDS_DS.hxx>
 #include <BOPDS_IndexRange.hxx>
 #include <BOPDS_Iterator.hxx>
 #include <BOPDS_Pair.hxx>
 #include <BOPDS_MapOfPair.hxx>
 #include <BOPDS_Tools.hxx>
+#include <BOPTools_BoxBndTree.hxx>
+#include <BOPTools_Parallel.hxx>
 #include <NCollection_UBTreeFiller.hxx>
+#include <NCollection_Vector.hxx>
 #include <TopoDS_Shape.hxx>
 #include <algorithm>
 
 //class    : BOPDS_TreeSelector
 //purpose  : 
 //=======================================================================
-class BOPDS_TSR : public BOPCol_BoxBndTreeSelector{
+class BOPDS_TSR : public BOPTools_BoxBndTreeSelector{
  public:
   BOPDS_TSR() : 
-    BOPCol_BoxBndTreeSelector(), 
+    BOPTools_BoxBndTreeSelector(), 
     myHasBRep(Standard_False), 
     myTree(NULL) {
   }
@@ -50,7 +50,7 @@ class BOPDS_TSR : public BOPCol_BoxBndTreeSelector{
     myHasBRep=bFlag;
   }
   //
-  void SetTree(BOPCol_BoxBndTree& aTree) {
+  void SetTree(BOPTools_BoxBndTree& aTree) {
     myTree=&aTree;
   }
   //
@@ -62,13 +62,13 @@ class BOPDS_TSR : public BOPCol_BoxBndTreeSelector{
   //
  protected:
   Standard_Boolean myHasBRep;
-  BOPCol_BoxBndTree *myTree;
+  BOPTools_BoxBndTree *myTree;
 };
 //
 //=======================================================================
-typedef BOPCol_NCVector <BOPDS_TSR> BOPDS_VectorOfTSR; 
-typedef BOPCol_Functor <BOPDS_TSR,BOPDS_VectorOfTSR> BOPDS_TSRFunctor;
-typedef BOPCol_Cnt <BOPDS_TSRFunctor, BOPDS_VectorOfTSR> BOPDS_TSRCnt;
+typedef NCollection_Vector <BOPDS_TSR> BOPDS_VectorOfTSR; 
+typedef BOPTools_Functor <BOPDS_TSR,BOPDS_VectorOfTSR> BOPDS_TSRFunctor;
+typedef BOPTools_Cnt <BOPDS_TSRFunctor, BOPDS_VectorOfTSR> BOPDS_TSRCnt;
 /////////////////////////////////////////////////////////////////////////
 
 
@@ -89,7 +89,7 @@ BOPDS_Iterator::BOPDS_Iterator()
   aNb=BOPDS_DS::NbInterfTypes();
   myLists.SetIncrement(aNb);
   for (i=0; i<aNb; ++i) {
-    myLists.Append1();
+    myLists.Appended();
   }
 }
 //=======================================================================
@@ -111,7 +111,7 @@ BOPDS_Iterator::BOPDS_Iterator
   aNb=BOPDS_DS::NbInterfTypes();
   myLists.SetIncrement(aNb);
   for (i=0; i<aNb; ++i) {
-    myLists.Append1();
+    myLists.Appended();
   }
 }
 //=======================================================================
@@ -195,7 +195,7 @@ void BOPDS_Iterator::Initialize(const TopAbs_ShapeEnum aType1,
     std::stable_sort(myLists(iX).begin(), myLists(iX).end());
     // initialize iterator to access the pairs
     myIterator.Init(myLists(iX));
-    myLength = myLists(iX).Extent();
+    myLength = myLists(iX).Length();
   }
 }
 //=======================================================================
@@ -266,7 +266,7 @@ void BOPDS_Iterator::Intersect()
   Standard_Integer iTi, iTj;
   TopAbs_ShapeEnum aTi, aTj;
   //
-  BOPCol_BoxBndTree aBBTree;
+  BOPTools_BoxBndTree aBBTree;
   NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
   //
   aNb = myDS->NbSourceShapes();
@@ -276,7 +276,7 @@ void BOPDS_Iterator::Intersect()
     const BOPDS_ShapeInfo& aSI=myDS->ShapeInfo(i);
     Standard_Boolean bHasBrep = aSI.IsInterfering() && !(aSI.ShapeType() == TopAbs_SOLID);
     //
-    BOPDS_TSR& aTSR=aVTSR.Append1();
+    BOPDS_TSR& aTSR=aVTSR.Appended();
     //
     aTSR.SetHasBRep(bHasBrep);
     if (!bHasBrep) {
@@ -311,7 +311,7 @@ void BOPDS_Iterator::Intersect()
       }
       //
       BOPDS_TSR& aTSRi = aVTSR(i);
-      const BOPCol_ListOfInteger& aLI = aTSRi.Indices();
+      const TColStd_ListOfInteger& aLI = aTSRi.Indices();
       Standard_Integer aNbSD = aLI.Extent();
       if (!aNbSD) {
         continue;
@@ -320,7 +320,7 @@ void BOPDS_Iterator::Intersect()
       aTi = aSI.ShapeType();
       iTi = BOPDS_Tools::TypeToInteger(aTi);
       //
-      BOPCol_ListIteratorOfListOfInteger aIt(aLI);
+      TColStd_ListIteratorOfListOfInteger aIt(aLI);
       for (; aIt.More(); aIt.Next()) {
         j = aIt.Value(); // DS index
         if (j >= i1 && j <= i2) {