Salome HOME
0022289: EDF 2623 GEOM: Make "MakePipeWithDifferentsSections" available from GUI...
[modules/geom.git] / src / GEOMImpl / GEOMImpl_XAODriver.hxx
1 //  Copyright (C) 2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
22 #ifndef _GEOMImpl_XAODriver_HXX
23 #define _GEOMImpl_XAODriver_HXX
24
25 #include <TFunction_Driver.hxx>
26
27 class Handle_Standard_Type;
28 class GEOMImpl_XAODriver;
29
30 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_XAODriver);
31
32 class Handle(GEOMImpl_XAODriver): public Handle(TFunction_Driver)
33 {
34 public:
35     inline void* operator new(size_t, void* anAddress)
36     {
37         return anAddress;
38     }
39     inline void* operator new(size_t size)
40     {
41         return Standard::Allocate(size);
42     }
43     inline void operator delete(void *anAddress)
44     {
45         if (anAddress) Standard::Free((Standard_Address&) anAddress);
46     }
47
48     Handle(GEOMImpl_XAODriver) () :
49             Handle(TFunction_Driver)()
50     {
51     }
52     Handle(GEOMImpl_XAODriver) (const Handle(GEOMImpl_XAODriver)& aHandle) :
53             Handle(TFunction_Driver)(aHandle)
54     {
55     }
56
57     Handle(GEOMImpl_XAODriver) (const GEOMImpl_XAODriver* anItem) :
58             Handle(TFunction_Driver)((TFunction_Driver *) anItem)
59     {
60     }
61
62     Handle(GEOMImpl_XAODriver)& operator=(const Handle(GEOMImpl_XAODriver)& aHandle)
63     {
64         Assign(aHandle.Access());
65         return *this;
66     }
67
68     Handle(GEOMImpl_XAODriver)& operator=(const GEOMImpl_XAODriver* anItem)
69     {
70         Assign((Standard_Transient *) anItem);
71         return *this;
72     }
73
74     GEOMImpl_XAODriver* operator->()
75     {
76         return (GEOMImpl_XAODriver *) ControlAccess();
77     }
78
79     GEOMImpl_XAODriver* operator->() const
80     {
81         return (GEOMImpl_XAODriver *) ControlAccess();
82     }
83
84     Standard_EXPORT
85     ~Handle(GEOMImpl_XAODriver)()
86     {
87     }
88
89     Standard_EXPORT
90     static const Handle(GEOMImpl_XAODriver) DownCast(const Handle(Standard_Transient)& AnObject);
91 };
92
93 class GEOMImpl_XAODriver: public TFunction_Driver
94 {
95 public:
96     inline void* operator new(size_t, void* anAddress)
97     {
98         return anAddress;
99     }
100     inline void* operator new(size_t size)
101     {
102         return Standard::Allocate(size);
103     }
104     inline void operator delete(void *anAddress)
105     {
106         if (anAddress) Standard::Free((Standard_Address&) anAddress);
107     }
108
109     // Methods PUBLIC
110     //
111     Standard_EXPORT
112     GEOMImpl_XAODriver();
113     Standard_EXPORT
114     virtual Standard_Integer Execute(TFunction_Logbook& log) const;
115     Standard_EXPORT
116     virtual void Validate(TFunction_Logbook&) const
117     {
118     }
119     Standard_EXPORT
120     Standard_Boolean MustExecute(const TFunction_Logbook&) const
121     {
122         return Standard_True;
123     }
124     Standard_EXPORT
125     static const Standard_GUID& GetID();
126     Standard_EXPORT
127     ~GEOMImpl_XAODriver()
128     {
129     }
130
131     // Type management
132     //
133     Standard_EXPORT
134     friend Handle_Standard_Type& GEOMImpl_ExportXAODriver_Type_();
135     Standard_EXPORT
136     const Handle(Standard_Type)& DynamicType() const
137     {
138         return STANDARD_TYPE(GEOMImpl_XAODriver);
139     }
140     Standard_EXPORT
141     Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
142     {
143         return (STANDARD_TYPE(GEOMImpl_XAODriver) == AType || TFunction_Driver::IsKind(AType));
144     }
145 };
146
147 #endif // _GEOMImpl_XAODriver_HXX