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