Back to index

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