1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File: GEOMAlgo_BuilderShape.hxx
25 // Author: Peter KURNEV
27 #ifndef _GEOMAlgo_BuilderShape_HeaderFile
28 #define _GEOMAlgo_BuilderShape_HeaderFile
30 #include <Standard.hxx>
31 #include <Standard_Macro.hxx>
32 #include <TopoDS_Shape.hxx>
33 #include <TopTools_ListOfShape.hxx>
34 #include <TopTools_MapOfShape.hxx>
35 #include <Standard_Boolean.hxx>
36 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
37 #include <GEOMAlgo_Algo.hxx>
40 //! Root class for algorithms that has shape as result <br>
41 //=======================================================================
42 //class : GEOMAlgo_BuilderShape
44 //=======================================================================
45 class GEOMAlgo_BuilderShape : public GEOMAlgo_Algo
48 //! Returns the result of algorithm <br>
50 const TopoDS_Shape& Shape() const;
52 //! Returns the list of shapes generated from the <br>
55 virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ;
57 //! Returns the list of shapes modified from the <br>
60 virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ;
62 //! Returns true if the shape theS has been deleted. <br>
64 virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ;
66 //! Returns true if the at least one shape(or sub-shape) <br>
67 //! of arguments has been deleted. <br>
69 Standard_Boolean HasDeleted() const;
71 //! Returns true if the at least one shape(or sub-shape) <br>
72 //! of arguments has generated shapes. <br>
74 Standard_Boolean HasGenerated() const;
76 //! Returns true if the at least one shape(or sub-shape) <br>
77 //! of arguments has modified shapes. <br>
79 Standard_Boolean HasModified() const;
82 const TopTools_IndexedDataMapOfShapeListOfShape& ImagesResult() const;
85 //! Empty constructor <br>
87 GEOMAlgo_BuilderShape();
90 virtual ~GEOMAlgo_BuilderShape();
92 //! Prepare information for history support <br>
94 virtual void PrepareHistory() ;
98 TopTools_ListOfShape myHistShapes;
99 TopTools_MapOfShape myMapShape;
100 Standard_Boolean myHasDeleted;
101 Standard_Boolean myHasGenerated;
102 Standard_Boolean myHasModified;
103 TopTools_IndexedDataMapOfShapeListOfShape myImagesResult;