]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx
Salome HOME
[GITHUB #1] updated TUI command doc for make sphere from point and radius
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_PassKeyShape.hxx
1
2 // Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
3 //
4 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
5 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 //
7 // This library is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU Lesser General Public
9 // License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 //
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // Lesser General Public License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public
18 // License along with this library; if not, write to the Free Software
19 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20 //
21 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 //
23
24 // File:        GEOMAlgo_PassKeyShape.hxx
25 // Created:
26 // Author:      Peter KURNEV
27 //              <pkv@irinox>
28 //
29 #ifndef _GEOMAlgo_PassKeyShape_HeaderFile
30 #define _GEOMAlgo_PassKeyShape_HeaderFile
31
32 #include <Basics_OCCTVersion.hxx>
33
34 #include <Standard.hxx>
35 #include <Standard_Macro.hxx>
36 #include <Standard_Integer.hxx>
37 #include <TopTools_IndexedMapOfShape.hxx>
38 #include <Standard_Boolean.hxx>
39 #include <TopoDS_Shape.hxx>
40 #include <TopTools_ListOfShape.hxx>
41
42
43 //=======================================================================
44 //class    : GEOMAlgo_PassKeyShape
45 //purpose  :
46 //=======================================================================
47 class GEOMAlgo_PassKeyShape  {
48  public:
49   Standard_EXPORT
50     GEOMAlgo_PassKeyShape();
51
52   Standard_EXPORT
53     virtual ~GEOMAlgo_PassKeyShape();
54
55   Standard_EXPORT
56     GEOMAlgo_PassKeyShape(const GEOMAlgo_PassKeyShape& Other);
57
58   Standard_EXPORT
59     GEOMAlgo_PassKeyShape& Assign(const GEOMAlgo_PassKeyShape& Other) ;
60
61   GEOMAlgo_PassKeyShape& operator =(const GEOMAlgo_PassKeyShape& Other) {
62     return Assign(Other);
63   }
64
65   Standard_EXPORT
66     void SetShapes(const TopoDS_Shape& aS) ;
67
68   Standard_EXPORT
69     void SetShapes(const TopoDS_Shape& aS1,
70                    const TopoDS_Shape& aS2) ;
71
72   Standard_EXPORT
73     void SetShapes(const TopoDS_Shape& aS1,
74                    const TopoDS_Shape& aS2,
75                    const TopoDS_Shape& aS3) ;
76
77   Standard_EXPORT
78     void SetShapes(const TopoDS_Shape& aS1,
79                    const TopoDS_Shape& aS2,
80                    const TopoDS_Shape& aS3,
81                    const TopoDS_Shape& aS4) ;
82
83   Standard_EXPORT
84     void SetShapes(const TopTools_ListOfShape& aLS) ;
85
86   Standard_EXPORT
87     void Clear() ;
88
89   Standard_EXPORT
90     Standard_Integer NbIds() const;
91
92   Standard_EXPORT
93     Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aOther) const;
94
95 #if OCC_VERSION_LARGE < 0x07080000
96   Standard_EXPORT
97     Standard_Integer HashCode(const Standard_Integer Upper) const;
98 #endif
99
100   Standard_EXPORT
101   bool operator==(const GEOMAlgo_PassKeyShape& theOther) const
102   {
103     return IsEqual(theOther);
104   }
105
106   Standard_EXPORT
107     size_t GetSum() const { return (size_t)mySum; }
108
109   Standard_EXPORT
110     void Dump(const Standard_Integer aHex = 0) const;
111
112 protected:
113   Standard_Integer myNbIds;
114   Standard_Integer mySum;
115   Standard_Integer myUpper;
116   TopTools_IndexedMapOfShape myMap;
117 };
118 #endif