1 // Created by: Peter KURNEV
2 // Copyright (c) 2010-2012 OPEN CASCADE SAS
3 // Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
4 // Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
5 // EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
7 // The content of this file is subject to the Open CASCADE Technology Public
8 // License Version 6.5 (the "License"). You may not use the content of this file
9 // except in compliance with the License. Please obtain a copy of the License
10 // at http://www.opencascade.org and read it completely before using this file.
12 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
13 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
15 // The Original Code and all software distributed under the License is
16 // distributed on an "AS IS" basis, without warranty of any kind, and the
17 // Initial Developer hereby disclaims all such warranties, including without
18 // limitation, any warranties of merchantability, fitness for a particular
19 // purpose or non-infringement. Please see the License for the specific terms
20 // and conditions governing the rights and limitations under the License.
23 #include <BOPAlgo_BuilderShape.ixx>
24 //=======================================================================
27 //=======================================================================
28 BOPAlgo_BuilderShape::BOPAlgo_BuilderShape()
32 myHasDeleted=Standard_False;
33 myHasGenerated=Standard_False;
34 myHasModified=Standard_False;
35 myFlagHistory=Standard_False;
37 //=======================================================================
40 //=======================================================================
41 BOPAlgo_BuilderShape::BOPAlgo_BuilderShape(const Handle(NCollection_BaseAllocator)& theAllocator)
43 BOPAlgo_Algo(theAllocator)
45 myHasDeleted=Standard_False;
46 myHasGenerated=Standard_False;
47 myHasModified=Standard_False;
48 myFlagHistory=Standard_False;
50 //=======================================================================
53 //=======================================================================
54 BOPAlgo_BuilderShape::~BOPAlgo_BuilderShape()
57 //=======================================================================
60 //=======================================================================
61 const TopoDS_Shape& BOPAlgo_BuilderShape::Shape() const
66 //=======================================================================
67 //function : Generated
69 //=======================================================================
70 const TopTools_ListOfShape& BOPAlgo_BuilderShape::Generated(const TopoDS_Shape& )
75 //=======================================================================
78 //=======================================================================
79 const TopTools_ListOfShape& BOPAlgo_BuilderShape::Modified(const TopoDS_Shape& )
84 //=======================================================================
85 //function : IsDeleted
87 //=======================================================================
88 Standard_Boolean BOPAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS)
90 Standard_Boolean bRet;
92 bRet=!myMapShape.Contains(theS);
95 //=======================================================================
96 //function : HasDeleted
98 //=======================================================================
99 Standard_Boolean BOPAlgo_BuilderShape::HasDeleted()const
103 //=======================================================================
104 //function : HasGenerated
106 //=======================================================================
107 Standard_Boolean BOPAlgo_BuilderShape::HasGenerated()const
109 return myHasGenerated;
111 //=======================================================================
112 //function : HasModified
114 //=======================================================================
115 Standard_Boolean BOPAlgo_BuilderShape::HasModified()const
117 return myHasModified;
119 //=======================================================================
120 //function : PrepareHistory
122 //=======================================================================
123 void BOPAlgo_BuilderShape::PrepareHistory()
125 myHistShapes.Clear();
127 myHasDeleted=Standard_False;
128 myHasGenerated=Standard_False;
129 myHasModified=Standard_False;
130 myFlagHistory=Standard_False;
133 //=======================================================================
134 //function : ImagesResult
136 //=======================================================================
137 const BOPCol_IndexedDataMapOfShapeListOfShape&
138 BOPAlgo_BuilderShape::ImagesResult()const
140 return myImagesResult;