1 // Copyright (C) 2007-2013 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
23 // File : GEOMImpl_BooleanDriver.ixx
26 #ifndef _GEOMImpl_BooleanDriver_HeaderFile
27 #define _GEOMImpl_BooleanDriver_HeaderFile
29 #ifndef _TColStd_SequenceOfExtendedString_HeaderFile
30 #include <TColStd_SequenceOfExtendedString.hxx>
32 #ifndef _Standard_TypeMismatch_HeaderFile
33 #include <Standard_TypeMismatch.hxx>
36 #ifndef _Standard_HeaderFile
37 #include <Standard.hxx>
40 #ifndef _Standard_Macro_HeaderFile
41 #include <Standard_Macro.hxx>
43 #ifndef _Standard_HeaderFile
44 #include <Standard.hxx>
46 #ifndef _Standard_GUID_HeaderFile
47 #include <Standard_GUID.hxx>
50 #ifndef _Handle_TFunction_Driver_HeaderFile
51 #include <Handle_TFunction_Driver.hxx>
54 #ifndef _TopoDS_Shape_HeaderFile
55 #include <TopoDS_Shape.hxx>
59 class Standard_Transient;
60 class Handle_Standard_Type;
61 class Handle(TFunction_Driver);
62 class GEOMImpl_BooleanDriver;
64 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_BooleanDriver);
66 class Handle(GEOMImpl_BooleanDriver) : public Handle(TFunction_Driver) {
68 inline void* operator new(size_t,void* anAddress)
72 inline void* operator new(size_t size)
74 return Standard::Allocate(size);
76 inline void operator delete(void *anAddress)
78 if (anAddress) Standard::Free((Standard_Address&)anAddress);
81 Handle(GEOMImpl_BooleanDriver)():Handle(TFunction_Driver)() {}
82 Handle(GEOMImpl_BooleanDriver)(const Handle(GEOMImpl_BooleanDriver)& aHandle) : Handle(TFunction_Driver)(aHandle)
86 Handle(GEOMImpl_BooleanDriver)(const GEOMImpl_BooleanDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem)
90 Handle(GEOMImpl_BooleanDriver)& operator=(const Handle(GEOMImpl_BooleanDriver)& aHandle)
92 Assign(aHandle.Access());
96 Handle(GEOMImpl_BooleanDriver)& operator=(const GEOMImpl_BooleanDriver* anItem)
98 Assign((Standard_Transient *)anItem);
102 GEOMImpl_BooleanDriver* operator->()
104 return (GEOMImpl_BooleanDriver *)ControlAccess();
107 GEOMImpl_BooleanDriver* operator->() const
109 return (GEOMImpl_BooleanDriver *)ControlAccess();
112 Standard_EXPORT ~Handle(GEOMImpl_BooleanDriver)() {};
114 Standard_EXPORT static const Handle(GEOMImpl_BooleanDriver) DownCast(const Handle(Standard_Transient)& AnObject);
117 #ifndef _TFunction_Driver_HeaderFile
118 #include <TFunction_Driver.hxx>
120 #ifndef _TFunction_Logbook_HeaderFile
121 #include <TFunction_Logbook.hxx>
123 #ifndef _Standard_CString_HeaderFile
124 #include <Standard_CString.hxx>
127 class TColStd_SequenceOfExtendedString;
130 class GEOMImpl_BooleanDriver : public TFunction_Driver {
134 inline void* operator new(size_t,void* anAddress)
138 inline void* operator new(size_t size)
140 return Standard::Allocate(size);
142 inline void operator delete(void *anAddress)
144 if (anAddress) Standard::Free((Standard_Address&)anAddress);
149 Standard_EXPORT GEOMImpl_BooleanDriver();
150 Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const;
151 Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
152 Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; }
153 Standard_EXPORT static const Standard_GUID& GetID();
154 Standard_EXPORT ~GEOMImpl_BooleanDriver() {};
159 Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_BooleanDriver_Type_();
160 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_BooleanDriver) ; }
161 Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_BooleanDriver) == AType || TFunction_Driver::IsKind(AType)); }
166 TopoDS_Shape performOperation(const TopoDS_Shape theShape1,
167 const TopoDS_Shape theShape2,
168 const Standard_Integer theType) const;