]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOMImpl/GEOMImpl_SmoothingSurfaceDriver.hxx
Salome HOME
Mantis issue 0022227: Integration request: Building a surface from a cloud of points
[modules/geom.git] / src / GEOMImpl / GEOMImpl_SmoothingSurfaceDriver.hxx
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
22 #ifndef _GEOMImpl_SmoothingSurfaceDriver_HXX
23 #define _GEOMImpl_SmoothingSurfaceDriver_HXX
24
25 #ifndef _TFunction_Driver_HeaderFile
26 #include <TFunction_Driver.hxx>
27 #endif
28 #ifndef _TFunction_Logbook_HeaderFile
29 #include <TFunction_Logbook.hxx>
30 #endif
31 #ifndef _Standard_CString_HeaderFile
32 #include <Standard_CString.hxx>
33 #endif
34 #include <TColgp_HArray1OfPnt.hxx>
35 #include <TopoDS_Shape.hxx>
36
37 class Handle_Standard_Type;
38 class GEOMImpl_SmoothingSurfaceDriver;
39
40 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_SmoothingSurfaceDriver);
41
42 class Handle(GEOMImpl_SmoothingSurfaceDriver) : public Handle(TFunction_Driver) {
43 public:
44   inline void* operator new(size_t,void* anAddress) 
45   {
46     return anAddress;
47   }
48   inline void* operator new(size_t size) 
49   { 
50     return Standard::Allocate(size); 
51   }
52   inline void  operator delete(void *anAddress) 
53   { 
54     if (anAddress) Standard::Free((Standard_Address&)anAddress); 
55   }
56   
57   Handle(GEOMImpl_SmoothingSurfaceDriver)():Handle(TFunction_Driver)() {} 
58   Handle(GEOMImpl_SmoothingSurfaceDriver)(const Handle(GEOMImpl_SmoothingSurfaceDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) 
59   {}
60
61   Handle(GEOMImpl_SmoothingSurfaceDriver)(const GEOMImpl_SmoothingSurfaceDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) 
62   {}
63
64   Handle(GEOMImpl_SmoothingSurfaceDriver)& operator=(const Handle(GEOMImpl_SmoothingSurfaceDriver)& aHandle)
65   {
66     Assign(aHandle.Access());
67     return *this;
68   }
69   
70   Handle(GEOMImpl_SmoothingSurfaceDriver)& operator=(const GEOMImpl_SmoothingSurfaceDriver* anItem)
71   {
72     Assign((Standard_Transient *)anItem);
73     return *this;
74   }
75   
76   GEOMImpl_SmoothingSurfaceDriver* operator->() 
77   {
78     return (GEOMImpl_SmoothingSurfaceDriver *)ControlAccess();
79   }
80   
81   GEOMImpl_SmoothingSurfaceDriver* operator->() const 
82   {
83     return (GEOMImpl_SmoothingSurfaceDriver *)ControlAccess();
84   }
85   
86   Standard_EXPORT ~Handle(GEOMImpl_SmoothingSurfaceDriver)() {};
87   
88   Standard_EXPORT static const Handle(GEOMImpl_SmoothingSurfaceDriver) DownCast(const Handle(Standard_Transient)& AnObject);
89 };
90
91 class GEOMImpl_SmoothingSurfaceDriver : public TFunction_Driver {
92 public:
93   inline void* operator new(size_t,void* anAddress) 
94   {
95     return anAddress;
96   }
97   inline void* operator new(size_t size) 
98   { 
99     return Standard::Allocate(size); 
100   }
101   inline void  operator delete(void *anAddress) 
102   { 
103     if (anAddress) Standard::Free((Standard_Address&)anAddress); 
104   }
105   
106   // Methods PUBLIC
107   // 
108   Standard_EXPORT GEOMImpl_SmoothingSurfaceDriver();
109   Standard_EXPORT virtual  Standard_Integer Execute(TFunction_Logbook& log) const; 
110   Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
111   Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const
112   {
113     return Standard_True;
114   }
115   Standard_EXPORT static const Standard_GUID& GetID();
116   Standard_EXPORT ~GEOMImpl_SmoothingSurfaceDriver() {};
117   
118   // Type management
119   //
120   Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_SmoothingSurfaceDriver_Type_();
121   Standard_EXPORT const Handle(Standard_Type)& DynamicType() const
122   {
123     return STANDARD_TYPE(GEOMImpl_SmoothingSurfaceDriver);
124   }
125   Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
126   {
127     return (STANDARD_TYPE(GEOMImpl_SmoothingSurfaceDriver) == AType || TFunction_Driver::IsKind(AType));
128   } 
129 private:
130   TopoDS_Shape MakeSmoothingSurfaceUnClosed(Handle_TColgp_HArray1OfPnt myListOfPoints) const;
131 };
132
133 #endif // _GEOMImpl_SmoothingSurfaceDriver_HXX