0024624: Lost word in license statement in source files
[occt.git] / src / BOPDS / BOPDS_Iterator.cxx
index d6408bf..f95a3db 100644 (file)
@@ -1,24 +1,19 @@
 // Created by: Peter KURNEV
-// Copyright (c) 2010-2012 OPEN CASCADE SAS
+// Copyright (c) 2010-2014 OPEN CASCADE SAS
 // Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
 // Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
 //                         EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
 //
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
 //
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 #include <BOPDS_Iterator.ixx>
 //
@@ -36,7 +31,7 @@
 #include <BOPCol_DataMapOfIntegerMapOfInteger.hxx>
 #include <BOPCol_MapOfInteger.hxx>
 //
-#include <BOPDS_BoxBndTree.hxx>
+#include <BOPCol_BoxBndTree.hxx>
 #include <BOPDS_IndexRange.hxx>
 #include <BOPDS_PassKeyBoolean.hxx>
 #include <BOPDS_MapOfPassKeyBoolean.hxx>
 //function : 
 //purpose  : 
 //=======================================================================
-  BOPDS_Iterator::BOPDS_Iterator()
+BOPDS_Iterator::BOPDS_Iterator()
 :
   myAllocator(NCollection_BaseAllocator::CommonBaseAllocator())
 {
   myDS=NULL; 
   myLength=0;
   //
-  myLists.SetStartSize(6);
+  myLists.SetStartSize(BOPDS_DS::NbInterfTypes());
   myLists.Init();
 }
 //=======================================================================
 //function : 
 //purpose  : 
 //=======================================================================
-  BOPDS_Iterator::BOPDS_Iterator(const Handle(NCollection_BaseAllocator)& theAllocator)
+BOPDS_Iterator::BOPDS_Iterator
+  (const Handle(NCollection_BaseAllocator)& theAllocator)
 :
   myAllocator(theAllocator),
   myLists(theAllocator)
   myDS=NULL; 
   myLength=0;
   //
-  myLists.SetStartSize(6);
+  myLists.SetStartSize(BOPDS_DS::NbInterfTypes());
   myLists.Init();
 }
 //=======================================================================
 //function : ~
 //purpose  : 
 //=======================================================================
-  BOPDS_Iterator::~BOPDS_Iterator()
+BOPDS_Iterator::~BOPDS_Iterator()
 {
 }
 //=======================================================================
 // function: SetDS
 // purpose: 
 //=======================================================================
-  void BOPDS_Iterator::SetDS(const BOPDS_PDS& aDS)
+void BOPDS_Iterator::SetDS(const BOPDS_PDS& aDS)
 {
   myDS=aDS;
 }
@@ -92,7 +88,7 @@
 // function: DS
 // purpose: 
 //=======================================================================
-  const BOPDS_DS&  BOPDS_Iterator::DS()const
+const BOPDS_DS&  BOPDS_Iterator::DS()const
 {
   return *myDS;
 }
 // function: ExpectedLength
 // purpose: 
 //=======================================================================
-  Standard_Integer BOPDS_Iterator::ExpectedLength() const
+Standard_Integer BOPDS_Iterator::ExpectedLength() const
 {
   return myLength;
 }
 // function: BlockLength
 // purpose: 
 //=======================================================================
-  Standard_Integer BOPDS_Iterator::BlockLength() const
+Standard_Integer BOPDS_Iterator::BlockLength() const
 {
   Standard_Integer aNbIIs;
   Standard_Real aCfPredict=.5;
 // function: Initialize
 // purpose: 
 //=======================================================================
-  void BOPDS_Iterator::Initialize(const TopAbs_ShapeEnum aType1,
-                                 const TopAbs_ShapeEnum aType2)
+void BOPDS_Iterator::Initialize(const TopAbs_ShapeEnum aType1,
+                               const TopAbs_ShapeEnum aType2)
 {
   Standard_Integer iX;
   //
 // function: More
 // purpose: 
 //=======================================================================
-  Standard_Boolean BOPDS_Iterator::More()const
+Standard_Boolean BOPDS_Iterator::More()const
 {
   return myIterator.More();
 }
 // function: Next
 // purpose: 
 //=======================================================================
-  void BOPDS_Iterator::Next()
+void BOPDS_Iterator::Next()
 {
   myIterator.Next();
 }
 // function: Value
 // purpose: 
 //=======================================================================
-  void BOPDS_Iterator::Value(Standard_Integer& theI1,
-                            Standard_Integer& theI2,
-                            Standard_Boolean& theWithSubShape) const
+void BOPDS_Iterator::Value(Standard_Integer& theI1,
+                          Standard_Integer& theI2,
+                          Standard_Boolean& theWithSubShape) const
 {
   Standard_Integer iT1, iT2, n1, n2;
   //
 // function: Prepare
 // purpose: 
 //=======================================================================
-  void BOPDS_Iterator::Prepare()
+void BOPDS_Iterator::Prepare()
 {
-  Standard_Integer i;
+  Standard_Integer i, aNbInterfTypes;
   //
+  aNbInterfTypes=BOPDS_DS::NbInterfTypes();
   myLength=0;
-  for (i=0; i<6; ++i) {
+  for (i=0; i<aNbInterfTypes; ++i) {
     myLists(i).Clear();
   }
   //
 // function: Intersect
 // purpose: 
 //=======================================================================
-  void BOPDS_Iterator::Intersect()
+void BOPDS_Iterator::Intersect()
 {
   Standard_Boolean bFlag;
   Standard_Integer aNb, i, aNbB, aNbR, iTi, iTj;
   BOPCol_IndexedDataMapOfShapeBox aMSB(100, aAllocator);
   BOPDS_PassKeyBoolean aPKXB; 
   //
-  BOPDS_BoxBndTreeSelector aSelector;
-  BOPDS_BoxBndTree aBBTree;
+  BOPCol_BoxBndTreeSelector aSelector;
+  BOPCol_BoxBndTree aBBTree;
   NCollection_UBTreeFiller <Standard_Integer, Bnd_Box> aTreeFiller(aBBTree);
   //
   aNb=myDS->NbSourceShapes();