Back to index

salome-geom  6.5.0
GEOMImpl_PipeDriver.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_PipeDriver.ixx
00024 //  Module : GEOMImpl
00025 
00026 #ifndef _GEOMImpl_PipeDriver_HeaderFile
00027 #define _GEOMImpl_PipeDriver_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 
00055 class Standard_Transient;
00056 class Handle_Standard_Type;
00057 class Handle(TFunction_Driver);
00058 class GEOMImpl_PipeDriver;
00059 
00060 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PipeDriver);
00061 
00062 class Handle(GEOMImpl_PipeDriver) : public Handle(TFunction_Driver) {
00063   public:
00064     inline void* operator new(size_t,void* anAddress) 
00065       {
00066         return anAddress;
00067       }
00068     inline void* operator new(size_t size) 
00069       { 
00070         return Standard::Allocate(size); 
00071       }
00072     inline void  operator delete(void *anAddress) 
00073       { 
00074         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
00075       }
00076 
00077     Handle(GEOMImpl_PipeDriver)():Handle(TFunction_Driver)() {} 
00078     Handle(GEOMImpl_PipeDriver)(const Handle(GEOMImpl_PipeDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) 
00079      {
00080      }
00081 
00082     Handle(GEOMImpl_PipeDriver)(const GEOMImpl_PipeDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) 
00083      {
00084      }
00085 
00086     Handle(GEOMImpl_PipeDriver)& operator=(const Handle(GEOMImpl_PipeDriver)& aHandle)
00087      {
00088       Assign(aHandle.Access());
00089       return *this;
00090      }
00091 
00092     Handle(GEOMImpl_PipeDriver)& operator=(const GEOMImpl_PipeDriver* anItem)
00093      {
00094       Assign((Standard_Transient *)anItem);
00095       return *this;
00096      }
00097 
00098     GEOMImpl_PipeDriver* operator->() 
00099      {
00100       return (GEOMImpl_PipeDriver *)ControlAccess();
00101      }
00102 
00103     GEOMImpl_PipeDriver* operator->() const 
00104      {
00105       return (GEOMImpl_PipeDriver *)ControlAccess();
00106      }
00107 
00108    Standard_EXPORT ~Handle(GEOMImpl_PipeDriver)() {};
00109  
00110    Standard_EXPORT static const Handle(GEOMImpl_PipeDriver) DownCast(const Handle(Standard_Transient)& AnObject);
00111 };
00112 
00113 #ifndef _TFunction_Driver_HeaderFile
00114 #include <TFunction_Driver.hxx>
00115 #endif
00116 #ifndef _TFunction_Logbook_HeaderFile
00117 #include <TFunction_Logbook.hxx>
00118 #endif
00119 #ifndef _Standard_CString_HeaderFile
00120 #include <Standard_CString.hxx>
00121 #endif
00122 
00123 #include <TopoDS_Wire.hxx>
00124 #include <TopoDS_Shape.hxx>
00125 #include <TopTools_HSequenceOfShape.hxx>
00126 
00127 class TColStd_SequenceOfExtendedString;
00128 
00129 
00130 class GEOMImpl_PipeDriver : public TFunction_Driver {
00131 
00132 public:
00133 
00134     inline void* operator new(size_t,void* anAddress) 
00135       {
00136         return anAddress;
00137       }
00138     inline void* operator new(size_t size) 
00139       { 
00140         return Standard::Allocate(size); 
00141       }
00142     inline void  operator delete(void *anAddress) 
00143       { 
00144         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
00145       }
00146 
00147   // Methods PUBLIC
00148   // 
00149   Standard_EXPORT GEOMImpl_PipeDriver();
00150   Standard_EXPORT virtual  Standard_Integer Execute(TFunction_Logbook& log) const; 
00151   Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
00152   Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const
00153   { return Standard_True; }
00154   Standard_EXPORT static const Standard_GUID& GetID();
00155   Standard_EXPORT ~GEOMImpl_PipeDriver() {};
00156 
00157   Standard_EXPORT static TopoDS_Shape CreatePipeWithDifferentSections
00158                                      (const TopoDS_Wire& theWirePath,
00159                                       const Handle(TopTools_HSequenceOfShape) theBases,
00160                                       const Handle(TopTools_HSequenceOfShape) theLocs,
00161                                       const Standard_Boolean theWithContact,
00162                                       const Standard_Boolean theWithCorrect);
00163 
00164 
00165   // Type management
00166   //
00167   Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PipeDriver_Type_();
00168   Standard_EXPORT const Handle(Standard_Type)& DynamicType() const
00169   { return STANDARD_TYPE(GEOMImpl_PipeDriver) ; }
00170   Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
00171   { return (STANDARD_TYPE(GEOMImpl_PipeDriver) == AType ||
00172             TFunction_Driver::IsKind(AType)); } 
00173 
00174 };
00175 
00176 #endif