1 // Created by: Peter KURNEV
2 // Copyright (c) 2010-2014 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 // This file is part of Open CASCADE Technology software library.
9 // This library is free software; you can redistribute it and / or modify it
10 // under the terms of the GNU Lesser General Public version 2.1 as published
11 // by the Free Software Foundation, with special exception defined in the file
12 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
13 // distribution for complete text of the license and disclaimer of any warranty.
15 // Alternatively, this file may be used under the terms of Open CASCADE
16 // commercial license or contractual agreement.
18 #include <BOPAlgo_BuilderShape.ixx>
19 //=======================================================================
22 //=======================================================================
23 BOPAlgo_BuilderShape::BOPAlgo_BuilderShape()
27 myHasDeleted=Standard_False;
28 myHasGenerated=Standard_False;
29 myHasModified=Standard_False;
30 myFlagHistory=Standard_False;
32 //=======================================================================
35 //=======================================================================
36 BOPAlgo_BuilderShape::BOPAlgo_BuilderShape(const Handle(NCollection_BaseAllocator)& theAllocator)
38 BOPAlgo_Algo(theAllocator)
40 myHasDeleted=Standard_False;
41 myHasGenerated=Standard_False;
42 myHasModified=Standard_False;
43 myFlagHistory=Standard_False;
45 //=======================================================================
48 //=======================================================================
49 BOPAlgo_BuilderShape::~BOPAlgo_BuilderShape()
52 //=======================================================================
55 //=======================================================================
56 const TopoDS_Shape& BOPAlgo_BuilderShape::Shape() const
61 //=======================================================================
62 //function : Generated
64 //=======================================================================
65 const TopTools_ListOfShape& BOPAlgo_BuilderShape::Generated(const TopoDS_Shape& )
70 //=======================================================================
73 //=======================================================================
74 const TopTools_ListOfShape& BOPAlgo_BuilderShape::Modified(const TopoDS_Shape& )
79 //=======================================================================
80 //function : IsDeleted
82 //=======================================================================
83 Standard_Boolean BOPAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS)
85 Standard_Boolean bRet;
87 bRet=!myMapShape.Contains(theS);
90 //=======================================================================
91 //function : HasDeleted
93 //=======================================================================
94 Standard_Boolean BOPAlgo_BuilderShape::HasDeleted()const
98 //=======================================================================
99 //function : HasGenerated
101 //=======================================================================
102 Standard_Boolean BOPAlgo_BuilderShape::HasGenerated()const
104 return myHasGenerated;
106 //=======================================================================
107 //function : HasModified
109 //=======================================================================
110 Standard_Boolean BOPAlgo_BuilderShape::HasModified()const
112 return myHasModified;
114 //=======================================================================
115 //function : PrepareHistory
117 //=======================================================================
118 void BOPAlgo_BuilderShape::PrepareHistory()
120 myHistShapes.Clear();
122 myHasDeleted=Standard_False;
123 myHasGenerated=Standard_False;
124 myHasModified=Standard_False;
125 myFlagHistory=Standard_False;
128 //=======================================================================
129 //function : ImagesResult
131 //=======================================================================
132 const BOPCol_IndexedDataMapOfShapeListOfShape&
133 BOPAlgo_BuilderShape::ImagesResult()const
135 return myImagesResult;