0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / BOPAlgo / BOPAlgo_BuilderShape.cxx
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
6 //
7 // This file is part of Open CASCADE Technology software library.
8 //
9 // This library is free software; you can redistribute it and/or modify it under
10 // the terms of the GNU Lesser General Public License 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.
14 //
15 // Alternatively, this file may be used under the terms of Open CASCADE
16 // commercial license or contractual agreement.
17
18
19 #include <BOPAlgo_BuilderShape.hxx>
20 #include <TopoDS_Shape.hxx>
21
22 //=======================================================================
23 //function : 
24 //purpose  : 
25 //=======================================================================
26   BOPAlgo_BuilderShape::BOPAlgo_BuilderShape()
27 :
28   BOPAlgo_Algo()
29 {
30   myHasDeleted=Standard_False;
31   myHasGenerated=Standard_False;
32   myHasModified=Standard_False;
33   myFlagHistory=Standard_False;
34 }
35 //=======================================================================
36 //function : 
37 //purpose  : 
38 //=======================================================================
39   BOPAlgo_BuilderShape::BOPAlgo_BuilderShape(const Handle(NCollection_BaseAllocator)& theAllocator)
40 :
41   BOPAlgo_Algo(theAllocator)
42 {
43   myHasDeleted=Standard_False;
44   myHasGenerated=Standard_False;
45   myHasModified=Standard_False;
46   myFlagHistory=Standard_False;
47 }
48 //=======================================================================
49 //function : ~
50 //purpose  : 
51 //=======================================================================
52   BOPAlgo_BuilderShape::~BOPAlgo_BuilderShape()
53 {
54 }
55 //=======================================================================
56 //function : Shape
57 //purpose  : 
58 //=======================================================================
59   const TopoDS_Shape& BOPAlgo_BuilderShape::Shape() const
60 {
61   return myShape;
62 }
63 //
64 //=======================================================================
65 //function : Generated
66 //purpose  : 
67 //=======================================================================
68   const TopTools_ListOfShape& BOPAlgo_BuilderShape::Generated(const TopoDS_Shape& )
69 {
70   myHistShapes.Clear();
71   return myHistShapes;
72 }
73 //=======================================================================
74 //function : Modified
75 //purpose  : 
76 //=======================================================================
77   const TopTools_ListOfShape& BOPAlgo_BuilderShape::Modified(const TopoDS_Shape& )
78 {
79   myHistShapes.Clear();
80   return myHistShapes;
81 }
82 //=======================================================================
83 //function : IsDeleted
84 //purpose  : 
85 //=======================================================================
86   Standard_Boolean BOPAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS)
87 {
88   Standard_Boolean bRet;
89   //
90   bRet=!myMapShape.Contains(theS);
91   return bRet;  
92 }
93 //=======================================================================
94 //function : HasDeleted
95 //purpose  : 
96 //=======================================================================
97   Standard_Boolean BOPAlgo_BuilderShape::HasDeleted()const
98 {
99   return myHasDeleted;
100 }
101 //=======================================================================
102 //function : HasGenerated
103 //purpose  : 
104 //=======================================================================
105   Standard_Boolean BOPAlgo_BuilderShape::HasGenerated()const
106 {
107   return myHasGenerated;
108 }
109 //=======================================================================
110 //function : HasModified
111 //purpose  : 
112 //=======================================================================
113   Standard_Boolean BOPAlgo_BuilderShape::HasModified()const
114 {
115   return myHasModified;
116 }
117 //=======================================================================
118 //function : PrepareHistory
119 //purpose  : 
120 //=======================================================================
121   void BOPAlgo_BuilderShape::PrepareHistory()
122 {
123   myHistShapes.Clear();
124   myMapShape.Clear();
125   myHasDeleted=Standard_False;
126   myHasGenerated=Standard_False;
127   myHasModified=Standard_False;
128   myFlagHistory=Standard_False;
129 }
130
131 //=======================================================================
132 //function : ImagesResult
133 //purpose  : 
134 //=======================================================================
135   const BOPCol_IndexedDataMapOfShapeListOfShape& 
136     BOPAlgo_BuilderShape::ImagesResult()const
137 {
138   return myImagesResult;
139 }
140