Salome HOME
5d09fde72c4139272462698207eba9463a5055ca
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_BuilderShape.cxx
1 //  Copyright (C) 2007-2008  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 // File:        GEOMAlgo_BuilderShape.cxx
23 // Created:     
24 // Author:      Peter KURNEV 
25 //
26 #include <GEOMAlgo_BuilderShape.ixx>
27 //=======================================================================
28 //function : 
29 //purpose  : 
30 //=======================================================================
31   GEOMAlgo_BuilderShape::GEOMAlgo_BuilderShape()
32 :
33   GEOMAlgo_Algo()
34 {
35   myHasDeleted=Standard_False;
36   myHasGenerated=Standard_False;
37   myHasModified=Standard_False;
38 }
39 //=======================================================================
40 //function : ~
41 //purpose  : 
42 //=======================================================================
43   GEOMAlgo_BuilderShape::~GEOMAlgo_BuilderShape()
44 {
45 }
46 //=======================================================================
47 //function : Shape
48 //purpose  : 
49 //=======================================================================
50   const TopoDS_Shape& GEOMAlgo_BuilderShape::Shape() const
51 {
52   return myShape;
53 }
54 //
55 //=======================================================================
56 //function : Generated
57 //purpose  : 
58 //=======================================================================
59   const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Generated(const TopoDS_Shape& )
60 {
61   myHistShapes.Clear();
62   return myHistShapes;
63 }
64 //=======================================================================
65 //function : Modified
66 //purpose  : 
67 //=======================================================================
68   const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Modified(const TopoDS_Shape& )
69 {
70   myHistShapes.Clear();
71   return myHistShapes;
72 }
73 //=======================================================================
74 //function : IsDeleted
75 //purpose  : 
76 //=======================================================================
77   Standard_Boolean GEOMAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS)
78 {
79   Standard_Boolean bRet;
80   //
81   bRet=!myMapShape.Contains(theS);
82   return bRet;  
83 }
84 //=======================================================================
85 //function : HasDeleted
86 //purpose  : 
87 //=======================================================================
88   Standard_Boolean GEOMAlgo_BuilderShape::HasDeleted()const
89 {
90   return myHasDeleted;
91 }
92 //=======================================================================
93 //function : HasGenerated
94 //purpose  : 
95 //=======================================================================
96   Standard_Boolean GEOMAlgo_BuilderShape::HasGenerated()const
97 {
98   return myHasGenerated;
99 }
100 //=======================================================================
101 //function : HasModified
102 //purpose  : 
103 //=======================================================================
104   Standard_Boolean GEOMAlgo_BuilderShape::HasModified()const
105 {
106   return myHasModified;
107 }
108 //=======================================================================
109 //function : PrepareHistory
110 //purpose  : 
111 //=======================================================================
112   void GEOMAlgo_BuilderShape::PrepareHistory()
113 {
114   myHistShapes.Clear();
115   myMapShape.Clear();
116   myHasDeleted=Standard_False;
117   myHasGenerated=Standard_False;
118   myHasModified=Standard_False;
119   //modified by NIZNHY-PKV Thu Dec  7 11:14:15 2006
120   myImagesResult.Clear();
121   //modified by NIZNHY-PKV Thu Dec  7 11:14:17 2006t
122 }
123 //modified by NIZNHY-PKV Thu Dec  7 11:57:00 2006f
124 //=======================================================================
125 //function : ImagesResult
126 //purpose  : 
127 //=======================================================================
128   const TopTools_IndexedDataMapOfShapeListOfShape& GEOMAlgo_BuilderShape::ImagesResult()const
129 {
130   return myImagesResult;
131 }
132 //modified by NIZNHY-PKV Thu Dec  7 11:57:04 2006t