Salome HOME
Merge from V6_main 01/04/2013
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_BuilderShape.cxx
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // File:        GEOMAlgo_BuilderShape.cxx
24 // Created:
25 // Author:      Peter KURNEV
26 //
27 #include <GEOMAlgo_BuilderShape.hxx>
28 //=======================================================================
29 //function :
30 //purpose  :
31 //=======================================================================
32   GEOMAlgo_BuilderShape::GEOMAlgo_BuilderShape()
33 :
34   GEOMAlgo_Algo()
35 {
36   myHasDeleted=Standard_False;
37   myHasGenerated=Standard_False;
38   myHasModified=Standard_False;
39 }
40 //=======================================================================
41 //function : ~
42 //purpose  :
43 //=======================================================================
44   GEOMAlgo_BuilderShape::~GEOMAlgo_BuilderShape()
45 {
46 }
47 //=======================================================================
48 //function : Shape
49 //purpose  :
50 //=======================================================================
51   const TopoDS_Shape& GEOMAlgo_BuilderShape::Shape() const
52 {
53   return myShape;
54 }
55 //
56 //=======================================================================
57 //function : Generated
58 //purpose  :
59 //=======================================================================
60   const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Generated(const TopoDS_Shape& )
61 {
62   myHistShapes.Clear();
63   return myHistShapes;
64 }
65 //=======================================================================
66 //function : Modified
67 //purpose  :
68 //=======================================================================
69   const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Modified(const TopoDS_Shape& )
70 {
71   myHistShapes.Clear();
72   return myHistShapes;
73 }
74 //=======================================================================
75 //function : IsDeleted
76 //purpose  :
77 //=======================================================================
78   Standard_Boolean GEOMAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS)
79 {
80   Standard_Boolean bRet;
81   //
82   bRet=!myMapShape.Contains(theS);
83   return bRet;
84 }
85 //=======================================================================
86 //function : HasDeleted
87 //purpose  :
88 //=======================================================================
89   Standard_Boolean GEOMAlgo_BuilderShape::HasDeleted()const
90 {
91   return myHasDeleted;
92 }
93 //=======================================================================
94 //function : HasGenerated
95 //purpose  :
96 //=======================================================================
97   Standard_Boolean GEOMAlgo_BuilderShape::HasGenerated()const
98 {
99   return myHasGenerated;
100 }
101 //=======================================================================
102 //function : HasModified
103 //purpose  :
104 //=======================================================================
105   Standard_Boolean GEOMAlgo_BuilderShape::HasModified()const
106 {
107   return myHasModified;
108 }
109 //=======================================================================
110 //function : PrepareHistory
111 //purpose  :
112 //=======================================================================
113   void GEOMAlgo_BuilderShape::PrepareHistory()
114 {
115   myHistShapes.Clear();
116   myMapShape.Clear();
117   myHasDeleted=Standard_False;
118   myHasGenerated=Standard_False;
119   myHasModified=Standard_False;
120   //modified by NIZNHY-PKV Thu Dec  7 11:14:15 2006
121   myImagesResult.Clear();
122   //modified by NIZNHY-PKV Thu Dec  7 11:14:17 2006t
123 }
124 //modified by NIZNHY-PKV Thu Dec  7 11:57:00 2006f
125 //=======================================================================
126 //function : ImagesResult
127 //purpose  :
128 //=======================================================================
129   const TopTools_IndexedDataMapOfShapeListOfShape& GEOMAlgo_BuilderShape::ImagesResult()const
130 {
131   return myImagesResult;
132 }
133 //modified by NIZNHY-PKV Thu Dec  7 11:57:04 2006t