Salome HOME
Internal issue 0022865: Restructurization of Partition packages.
[modules/geom.git] / src / GEOMAlgo_NEW / GEOMAlgo_ShapeSet.hxx
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE\r
2 //\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
5 //\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
10 //\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
15 //\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
19 //\r
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
21 //\r
22 \r
23 // File:        GEOMAlgo_ShapeSet.hxx\r
24 // Created:     \r
25 // Author:      Peter KURNEV \r
26 //\r
27 #ifndef _GEOMAlgo_ShapeSet_HeaderFile\r
28 #define _GEOMAlgo_ShapeSet_HeaderFile\r
29 \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
37 \r
38 //! Implementation some formal <br>\r
39 //!          opereations with Set of shapes <br>\r
40 //=======================================================================\r
41 //class    : GEOMAlgo_ShapeSet\r
42 //purpose  : \r
43 //=======================================================================\r
44 class GEOMAlgo_ShapeSet  \r
45 {\r
46  public:\r
47   //! Empty constructor <br>\r
48   Standard_EXPORT\r
49     GEOMAlgo_ShapeSet();\r
50   \r
51   //! Adds shapes from the list theLS to the Set <br>\r
52   Standard_EXPORT\r
53     void Add(const TopTools_ListOfShape& theLS) ;\r
54   \r
55   //! Adds shape theShape to the Set <br>\r
56   Standard_EXPORT\r
57     void Add(const TopoDS_Shape& theShape) ;\r
58   \r
59   //! Adds sub-shapes of shape theShape, <br>\r
60   //!          that have type theType to the Set <br>\r
61   Standard_EXPORT\r
62     void Add(const TopoDS_Shape& theShape,const TopAbs_ShapeEnum theType) ;\r
63   \r
64   //! Removes shapes of theSet from the Set <br>\r
65   Standard_EXPORT\r
66     void Subtract(const GEOMAlgo_ShapeSet& theSet) ;\r
67   \r
68   //! Clears internal fields <br>\r
69   Standard_EXPORT     void Clear() ;\r
70   \r
71   //! Returns True if the Set contains <br>\r
72   //!          all shapes of theSet <br>\r
73   Standard_EXPORT\r
74     Standard_Boolean Contains(const GEOMAlgo_ShapeSet& theSet) const;\r
75   \r
76   //! Returns the Set <br>\r
77   Standard_EXPORT\r
78     const TopTools_ListOfShape& GetSet() const;\r
79   \r
80   //! Returns True if the Set==theSet <br>\r
81   Standard_EXPORT\r
82     Standard_Boolean IsEqual(const GEOMAlgo_ShapeSet& theOther) const;\r
83   \r
84   Standard_Boolean operator ==(const GEOMAlgo_ShapeSet& theOther) const {\r
85     return IsEqual(theOther);\r
86   }\r
87 \r
88  protected:\r
89   TopTools_MapOfOrientedShape myMap;\r
90   TopTools_ListOfShape myList;\r
91 };\r
92 #endif\r