Salome HOME
Update copyrights 2014.
[modules/geom.git] / src / GEOMImpl / GEOMImpl_XAODriver.hxx
1 // Copyright (C) 2013-2014  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, or (at your option) any later version.
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
23 #ifndef _GEOMImpl_XAODriver_HXX
24 #define _GEOMImpl_XAODriver_HXX
25
26 #include <TFunction_Driver.hxx>
27
28 class Handle_Standard_Type;
29 class GEOMImpl_XAODriver;
30
31 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_XAODriver);
32
33 class Handle(GEOMImpl_XAODriver): public Handle(TFunction_Driver)
34 {
35 public:
36     inline void* operator new(size_t, void* anAddress)
37     {
38         return anAddress;
39     }
40     inline void* operator new(size_t size)
41     {
42         return Standard::Allocate(size);
43     }
44     inline void operator delete(void *anAddress)
45     {
46         if (anAddress) Standard::Free((Standard_Address&) anAddress);
47     }
48
49     Handle(GEOMImpl_XAODriver) () :
50             Handle(TFunction_Driver)()
51     {
52     }
53     Handle(GEOMImpl_XAODriver) (const Handle(GEOMImpl_XAODriver)& aHandle) :
54             Handle(TFunction_Driver)(aHandle)
55     {
56     }
57
58     Handle(GEOMImpl_XAODriver) (const GEOMImpl_XAODriver* anItem) :
59             Handle(TFunction_Driver)((TFunction_Driver *) anItem)
60     {
61     }
62
63     Handle(GEOMImpl_XAODriver)& operator=(const Handle(GEOMImpl_XAODriver)& aHandle)
64     {
65         Assign(aHandle.Access());
66         return *this;
67     }
68
69     Handle(GEOMImpl_XAODriver)& operator=(const GEOMImpl_XAODriver* anItem)
70     {
71         Assign((Standard_Transient *) anItem);
72         return *this;
73     }
74
75     GEOMImpl_XAODriver* operator->()
76     {
77         return (GEOMImpl_XAODriver *) ControlAccess();
78     }
79
80     GEOMImpl_XAODriver* operator->() const
81     {
82         return (GEOMImpl_XAODriver *) ControlAccess();
83     }
84
85     Standard_EXPORT
86     ~Handle(GEOMImpl_XAODriver)()
87     {
88     }
89
90     Standard_EXPORT
91     static const Handle(GEOMImpl_XAODriver) DownCast(const Handle(Standard_Transient)& AnObject);
92 };
93
94 class GEOMImpl_XAODriver: public TFunction_Driver
95 {
96 public:
97     inline void* operator new(size_t, void* anAddress)
98     {
99         return anAddress;
100     }
101     inline void* operator new(size_t size)
102     {
103         return Standard::Allocate(size);
104     }
105     inline void operator delete(void *anAddress)
106     {
107         if (anAddress) Standard::Free((Standard_Address&) anAddress);
108     }
109
110     // Methods PUBLIC
111     //
112     Standard_EXPORT
113     GEOMImpl_XAODriver();
114     Standard_EXPORT
115     virtual Standard_Integer Execute(TFunction_Logbook& log) const;
116     Standard_EXPORT
117     virtual void Validate(TFunction_Logbook&) const
118     {
119     }
120     Standard_EXPORT
121     Standard_Boolean MustExecute(const TFunction_Logbook&) const
122     {
123         return Standard_True;
124     }
125     Standard_EXPORT
126     static const Standard_GUID& GetID();
127     Standard_EXPORT
128     ~GEOMImpl_XAODriver()
129     {
130     }
131
132     // Type management
133     //
134     Standard_EXPORT
135     friend Handle_Standard_Type& GEOMImpl_ExportXAODriver_Type_();
136     Standard_EXPORT
137     const Handle(Standard_Type)& DynamicType() const
138     {
139         return STANDARD_TYPE(GEOMImpl_XAODriver);
140     }
141     Standard_EXPORT
142     Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const
143     {
144         return (STANDARD_TYPE(GEOMImpl_XAODriver) == AType || TFunction_Driver::IsKind(AType));
145     }
146 };
147
148 #endif // _GEOMImpl_XAODriver_HXX