Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/smesh.git] / src / SMESHFiltersSelection / Handle_SMESH_TypeFilter.hxx
1 //  SMESH SMDS : implementaion of Salome mesh data structure
2 //
3 //  Copyright (C) 2003  OPEN CASCADE
4 // 
5 //  This library is free software; you can redistribute it and/or 
6 //  modify it under the terms of the GNU Lesser General Public 
7 //  License as published by the Free Software Foundation; either 
8 //  version 2.1 of the License. 
9 // 
10 //  This library is distributed in the hope that it will be useful, 
11 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
12 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
13 //  Lesser General Public License for more details. 
14 // 
15 //  You should have received a copy of the GNU Lesser General Public 
16 //  License along with this library; if not, write to the Free Software 
17 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
18 // 
19 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20
21 #ifndef _Handle_SMESH_TypeFilter_HeaderFile
22 #define _Handle_SMESH_TypeFilter_HeaderFile
23
24 #ifndef _Standard_Macro_HeaderFile
25 #include <Standard_Macro.hxx>
26 #endif
27 #ifndef _Standard_HeaderFile
28 #include <Standard.hxx>
29 #endif
30
31 #ifndef _Handle_SALOME_Filter_HeaderFile
32 #include "Handle_SALOME_Filter.hxx"
33 #endif
34
35 class Standard_Transient;
36 class Handle_Standard_Type;
37 class Handle(SALOME_Filter);
38 class SMESH_TypeFilter;
39 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SMESH_TypeFilter);
40
41 class Handle(SMESH_TypeFilter) : public Handle(SALOME_Filter) {
42   public:
43     inline void* operator new(size_t,void* anAddress) 
44       {
45         return anAddress;
46       }
47     inline void* operator new(size_t size) 
48       { 
49         return Standard::Allocate(size); 
50       }
51     inline void  operator delete(void *anAddress) 
52       { 
53         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
54       }
55 //    inline void  operator delete(void *anAddress, size_t size) 
56 //      { 
57 //        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
58 //      }
59     Handle(SMESH_TypeFilter)():Handle(SALOME_Filter)() {} 
60     Handle(SMESH_TypeFilter)(const Handle(SMESH_TypeFilter)& aHandle) : Handle(SALOME_Filter)(aHandle) 
61      {
62      }
63
64     Handle(SMESH_TypeFilter)(const SMESH_TypeFilter* anItem) : Handle(SALOME_Filter)((SALOME_Filter *)anItem) 
65      {
66      }
67
68     Handle(SMESH_TypeFilter)& operator=(const Handle(SMESH_TypeFilter)& aHandle)
69      {
70       Assign(aHandle.Access());
71       return *this;
72      }
73
74     Handle(SMESH_TypeFilter)& operator=(const SMESH_TypeFilter* anItem)
75      {
76       Assign((Standard_Transient *)anItem);
77       return *this;
78      }
79
80     SMESH_TypeFilter* operator->() 
81      {
82       return (SMESH_TypeFilter *)ControlAccess();
83      }
84
85     SMESH_TypeFilter* operator->() const 
86      {
87       return (SMESH_TypeFilter *)ControlAccess();
88      }
89
90    Standard_EXPORT ~Handle(SMESH_TypeFilter)();
91  
92    Standard_EXPORT static const Handle(SMESH_TypeFilter) DownCast(const Handle(Standard_Transient)& AnObject);
93 };
94 #endif