Salome HOME
PAL12607: Static objects in Geometry GUI libraries.
[modules/geom.git] / src / GEOMAlgo / BlockFix_BlockFixAPI.hxx
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 #ifndef _BlockFix_BlockFixAPI_HeaderFile
21 #define _BlockFix_BlockFixAPI_HeaderFile
22
23 #ifndef _Standard_HeaderFile
24 #include <Standard.hxx>
25 #endif
26 #ifndef _Handle_BlockFix_BlockFixAPI_HeaderFile
27 #include <Handle_BlockFix_BlockFixAPI.hxx>
28 #endif
29
30 #ifndef _Handle_ShapeBuild_ReShape_HeaderFile
31 #include <Handle_ShapeBuild_ReShape.hxx>
32 #endif
33 #ifndef _TopoDS_Shape_HeaderFile
34 #include <TopoDS_Shape.hxx>
35 #endif
36 #ifndef _Standard_Real_HeaderFile
37 #include <Standard_Real.hxx>
38 #endif
39 #ifndef _MMgt_TShared_HeaderFile
40 #include <MMgt_TShared.hxx>
41 #endif
42 class ShapeBuild_ReShape;
43 class TopoDS_Shape;
44
45
46 class BlockFix_BlockFixAPI : public MMgt_TShared {
47
48 public:
49
50     void* operator new(size_t,void* anAddress) 
51       {
52         return anAddress;
53       }
54     void* operator new(size_t size) 
55       { 
56         return Standard::Allocate(size); 
57       }
58     void  operator delete(void *anAddress) 
59       { 
60         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
61       }
62  // Methods PUBLIC
63  // 
64 Standard_EXPORT BlockFix_BlockFixAPI();
65   void SetShape(const TopoDS_Shape& Shape) ;
66 Standard_EXPORT   void Perform() ;
67   TopoDS_Shape Shape() const;
68   Handle_ShapeBuild_ReShape& Context() ;
69   Standard_Real& Tolerance() ;
70 Standard_EXPORT ~BlockFix_BlockFixAPI();
71
72
73
74
75  // Type management
76  //
77  Standard_EXPORT friend Handle_Standard_Type& BlockFix_BlockFixAPI_Type_();
78  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
79  Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
80
81 protected:
82
83  // Methods PROTECTED
84  // 
85
86
87  // Fields PROTECTED
88  //
89
90
91 private: 
92
93  // Methods PRIVATE
94  // 
95
96
97  // Fields PRIVATE
98  //
99 Handle_ShapeBuild_ReShape myContext;
100 TopoDS_Shape myShape;
101 Standard_Real myTolerance;
102
103
104 };
105
106
107 #include <BlockFix_BlockFixAPI.lxx>
108
109
110
111 // other Inline functions and methods (like "C++: function call" methods)
112 //
113
114
115 #endif