1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #ifndef _GEOMImpl_DividedDiskDriver_HXX
23 #define _GEOMImpl_DividedDiskDriver_HXX
25 #include <TFunction_Driver.hxx>
27 class Handle_Standard_Type;
28 class GEOMImpl_DividedDiskDriver;
35 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_DividedDiskDriver);
37 class Handle(GEOMImpl_DividedDiskDriver) : public Handle(TFunction_Driver) {
39 inline void* operator new(size_t,void* anAddress)
43 inline void* operator new(size_t size)
45 return Standard::Allocate(size);
47 inline void operator delete(void *anAddress)
49 if (anAddress) Standard::Free((Standard_Address&)anAddress);
52 Handle(GEOMImpl_DividedDiskDriver)():Handle(TFunction_Driver)() {}
53 Handle(GEOMImpl_DividedDiskDriver)(const Handle(GEOMImpl_DividedDiskDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
56 Handle(GEOMImpl_DividedDiskDriver)(const GEOMImpl_DividedDiskDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
59 Handle(GEOMImpl_DividedDiskDriver)& operator=(const Handle(GEOMImpl_DividedDiskDriver)& aHandle)
61 Assign(aHandle.Access());
65 Handle(GEOMImpl_DividedDiskDriver)& operator=(const GEOMImpl_DividedDiskDriver* anItem)
67 Assign((Standard_Transient *)anItem);
71 GEOMImpl_DividedDiskDriver* operator->()
73 return (GEOMImpl_DividedDiskDriver *)ControlAccess();
76 GEOMImpl_DividedDiskDriver* operator->() const
78 return (GEOMImpl_DividedDiskDriver *)ControlAccess();
81 Standard_EXPORT ~Handle(GEOMImpl_DividedDiskDriver)() {};
83 Standard_EXPORT static const Handle(GEOMImpl_DividedDiskDriver) DownCast(const Handle(Standard_Transient)& AnObject);
86 class GEOMImpl_DividedDiskDriver : public TFunction_Driver {
88 inline void* operator new(size_t,void* anAddress)
92 inline void* operator new(size_t size)
94 return Standard::Allocate(size);
96 inline void operator delete(void *anAddress)
98 if (anAddress) Standard::Free((Standard_Address&)anAddress);
103 Standard_EXPORT GEOMImpl_DividedDiskDriver();
104 Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const;
105 Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
106 Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const
108 return Standard_True;
110 Standard_EXPORT static const Standard_GUID& GetID();
111 Standard_EXPORT ~GEOMImpl_DividedDiskDriver() {};
115 Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_DividedDiskDriver_Type_();
116 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const
118 return STANDARD_TYPE(GEOMImpl_DividedDiskDriver);
120 Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
122 return (STANDARD_TYPE(GEOMImpl_DividedDiskDriver) == AType || TFunction_Driver::IsKind(AType));
126 TopoDS_Shape TransformShape (TopoDS_Shape aShape, int theOrientation) const;
127 TopoDS_Shape TransformShape (TopoDS_Shape aShape, gp_Pnt P, gp_Dir V) const;
128 TopoDS_Shape WPlaneTransform (TopoDS_Shape aShape, gp_Ax3 theWPlane) const;
129 TopoDS_Shell MakeDiskHexagon (double R, double Ratio) const;
130 TopoDS_Shape MakeDiskSquare (double R, double Ratio) const;
133 #endif // _GEOMImpl_DividedDiskDriver_HXX