1 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
\r
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
\r
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
\r
6 // This library is free software; you can redistribute it and/or
\r
7 // modify it under the terms of the GNU Lesser General Public
\r
8 // License as published by the Free Software Foundation; either
\r
9 // version 2.1 of the License.
\r
11 // This library is distributed in the hope that it will be useful,
\r
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
\r
14 // Lesser General Public License for more details.
\r
16 // You should have received a copy of the GNU Lesser General Public
\r
17 // License along with this library; if not, write to the Free Software
\r
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
\r
23 // File: GEOMAlgo_ShapeSet.hxx
\r
25 // Author: Peter KURNEV
\r
27 #ifndef _GEOMAlgo_ShapeSet_HeaderFile
\r
28 #define _GEOMAlgo_ShapeSet_HeaderFile
\r
30 #include <Standard.hxx>
\r
31 #include <Standard_Macro.hxx>
\r
32 #include <TopTools_MapOfOrientedShape.hxx>
\r
33 #include <TopTools_ListOfShape.hxx>
\r
34 #include <TopAbs_ShapeEnum.hxx>
\r
35 #include <Standard_Boolean.hxx>
\r
36 #include <TopoDS_Shape.hxx>
\r
38 //! Implementation some formal <br>
\r
39 //! opereations with Set of shapes <br>
\r
40 //=======================================================================
\r
41 //class : GEOMAlgo_ShapeSet
\r
43 //=======================================================================
\r
44 class GEOMAlgo_ShapeSet
\r
47 //! Empty constructor <br>
\r
49 GEOMAlgo_ShapeSet();
\r
51 //! Adds shapes from the list theLS to the Set <br>
\r
53 void Add(const TopTools_ListOfShape& theLS) ;
\r
55 //! Adds shape theShape to the Set <br>
\r
57 void Add(const TopoDS_Shape& theShape) ;
\r
59 //! Adds sub-shapes of shape theShape, <br>
\r
60 //! that have type theType to the Set <br>
\r
62 void Add(const TopoDS_Shape& theShape,const TopAbs_ShapeEnum theType) ;
\r
64 //! Removes shapes of theSet from the Set <br>
\r
66 void Subtract(const GEOMAlgo_ShapeSet& theSet) ;
\r
68 //! Clears internal fields <br>
\r
69 Standard_EXPORT void Clear() ;
\r
71 //! Returns True if the Set contains <br>
\r
72 //! all shapes of theSet <br>
\r
74 Standard_Boolean Contains(const GEOMAlgo_ShapeSet& theSet) const;
\r
76 //! Returns the Set <br>
\r
78 const TopTools_ListOfShape& GetSet() const;
\r
80 //! Returns True if the Set==theSet <br>
\r
82 Standard_Boolean IsEqual(const GEOMAlgo_ShapeSet& theOther) const;
\r
84 Standard_Boolean operator ==(const GEOMAlgo_ShapeSet& theOther) const {
\r
85 return IsEqual(theOther);
\r
89 TopTools_MapOfOrientedShape myMap;
\r
90 TopTools_ListOfShape myList;
\r