Back to index

salome-geom  6.5.0
GEOMImpl_BlockDriver.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  File   : GEOMImpl_BlockDriver.ixx
00024 //  Module : GEOMImpl
00025 //
00026 #ifndef _GEOMImpl_BlockDriver_HeaderFile
00027 #define _GEOMImpl_BlockDriver_HeaderFile
00028 
00029 #ifndef _TColStd_SequenceOfExtendedString_HeaderFile
00030 #include <TColStd_SequenceOfExtendedString.hxx>
00031 #endif
00032 #ifndef _Standard_TypeMismatch_HeaderFile
00033 #include <Standard_TypeMismatch.hxx>
00034 #endif
00035 
00036 #ifndef _Standard_HeaderFile
00037 #include <Standard.hxx>
00038 #endif
00039 
00040 #ifndef _Standard_Macro_HeaderFile
00041 #include <Standard_Macro.hxx>
00042 #endif
00043 #ifndef _Standard_HeaderFile
00044 #include <Standard.hxx>
00045 #endif
00046 #ifndef _Standard_GUID_HeaderFile
00047 #include <Standard_GUID.hxx>
00048 #endif
00049 
00050 #ifndef _Handle_TFunction_Driver_HeaderFile
00051 #include <Handle_TFunction_Driver.hxx>
00052 #endif
00053 
00054 class Standard_Transient;
00055 class Handle_Standard_Type;
00056 class Handle(TFunction_Driver);
00057 class GEOMImpl_BlockDriver;
00058 
00059 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_BlockDriver);
00060 
00061 class Handle(GEOMImpl_BlockDriver) : public Handle(TFunction_Driver) {
00062   public:
00063     inline void* operator new(size_t,void* anAddress)
00064       {
00065         return anAddress;
00066       }
00067     inline void* operator new(size_t size)
00068       {
00069         return Standard::Allocate(size);
00070       }
00071     inline void  operator delete(void *anAddress)
00072       {
00073         if (anAddress) Standard::Free((Standard_Address&)anAddress);
00074       }
00075 
00076     Handle(GEOMImpl_BlockDriver)():Handle(TFunction_Driver)() {}
00077     Handle(GEOMImpl_BlockDriver)(const Handle(GEOMImpl_BlockDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
00078      {
00079      }
00080 
00081     Handle(GEOMImpl_BlockDriver)(const GEOMImpl_BlockDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
00082      {
00083      }
00084 
00085     Handle(GEOMImpl_BlockDriver)& operator=(const Handle(GEOMImpl_BlockDriver)& aHandle)
00086      {
00087       Assign(aHandle.Access());
00088       return *this;
00089      }
00090 
00091     Handle(GEOMImpl_BlockDriver)& operator=(const GEOMImpl_BlockDriver* anItem)
00092      {
00093       Assign((Standard_Transient *)anItem);
00094       return *this;
00095      }
00096 
00097     GEOMImpl_BlockDriver* operator->()
00098      {
00099       return (GEOMImpl_BlockDriver *)ControlAccess();
00100      }
00101 
00102     GEOMImpl_BlockDriver* operator->() const
00103      {
00104       return (GEOMImpl_BlockDriver *)ControlAccess();
00105      }
00106 
00107    Standard_EXPORT ~Handle(GEOMImpl_BlockDriver)() {};
00108 
00109    Standard_EXPORT static const Handle(GEOMImpl_BlockDriver) DownCast(const Handle(Standard_Transient)& AnObject);
00110 };
00111 
00112 #ifndef _TFunction_Driver_HeaderFile
00113 #include <TFunction_Driver.hxx>
00114 #endif
00115 #ifndef _TFunction_Logbook_HeaderFile
00116 #include <TFunction_Logbook.hxx>
00117 #endif
00118 #ifndef _Standard_CString_HeaderFile
00119 #include <Standard_CString.hxx>
00120 #endif
00121 #include <TopoDS_Shape.hxx>
00122 
00123 class TColStd_SequenceOfExtendedString;
00124 
00125 
00126 class GEOMImpl_BlockDriver : public TFunction_Driver {
00127 
00128 public:
00129 
00130     inline void* operator new(size_t,void* anAddress)
00131       {
00132         return anAddress;
00133       }
00134     inline void* operator new(size_t size)
00135       {
00136         return Standard::Allocate(size);
00137       }
00138     inline void  operator delete(void *anAddress)
00139       {
00140         if (anAddress) Standard::Free((Standard_Address&)anAddress);
00141       }
00142 
00143  // Methods PUBLIC
00144  //
00145 Standard_EXPORT GEOMImpl_BlockDriver();
00146 Standard_EXPORT virtual  Standard_Integer Execute(TFunction_Logbook& log) const;
00147 Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
00148 Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; }
00149 Standard_EXPORT static const Standard_GUID& GetID();
00150 Standard_EXPORT ~GEOMImpl_BlockDriver() {};
00151 
00152 
00153  // Type management
00154  //
00155 Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_BlockDriver_Type_();
00156 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const  { return STANDARD_TYPE(GEOMImpl_BlockDriver) ; }
00157 Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_BlockDriver) == AType || TFunction_Driver::IsKind(AType)); }
00158 
00159 private:
00160     void MultiTransformate1D (const TopoDS_Shape&    theBlock,
00161                               const TopoDS_Shape&    theFace1,
00162                               const TopoDS_Shape&    theFace2,
00163                               const Standard_Integer theNbIter,
00164                               TopoDS_Shape&          theResult) const;
00165 
00166     void MultiTransformate2D (const TopoDS_Shape&    theBlock,
00167                               const TopoDS_Shape&    theFace1U,
00168                               const TopoDS_Shape&    theFace2U,
00169                               const Standard_Integer theNbIterU,
00170                               const TopoDS_Shape&    theFace1V,
00171                               const TopoDS_Shape&    theFace2V,
00172                               const Standard_Integer theNbIterV,
00173                               TopoDS_Shape&          theResult) const;
00174 
00175 };
00176 
00177 #endif