Salome HOME
Fix on [Bug PAL7750] Regression of UNDO in GEOM
[modules/kernel.git] / src / SALOMEDS / Handle_SALOMEDS_TableOfRealAttribute.hxx
1 //  SALOME SALOMEDS : data structure of SALOME and sources of Salome data server 
2 //
3 //  Copyright (C) 2003  CEA/DEN, EDF R&D
4 //
5 //
6 //
7 //  File   : Handle_SALOMEDS_TableOfRealAttribute.hxx
8 //  Author : Michael Ponikarov
9 //  Module : SALOME
10 //  $Header$
11
12 #ifndef _Handle_SALOMEDS_TableOfRealAttribute_HeaderFile
13 #define _Handle_SALOMEDS_TableOfRealAttribute_HeaderFile
14
15 #ifndef _Standard_Macro_HeaderFile
16 #include <Standard_Macro.hxx>
17 #endif
18 #ifndef _Standard_HeaderFile
19 #include <Standard.hxx>
20 #endif
21
22 #ifndef _Handle_TDF_Attribute_HeaderFile
23 #include <Handle_TDF_Attribute.hxx>
24 #endif
25
26 class Standard_Transient;
27 class Handle_Standard_Type;
28 class Handle(TDF_Attribute);
29 class SALOMEDS_TableOfRealAttribute;
30 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_TableOfRealAttribute);
31
32 class Handle(SALOMEDS_TableOfRealAttribute) : public Handle(TDF_Attribute) {
33   public:
34     inline void* operator new(size_t,void* anAddress) 
35       {
36         return anAddress;
37       }
38     inline void* operator new(size_t size) 
39       { 
40         return Standard::Allocate(size); 
41       }
42     inline void  operator delete(void *anAddress) 
43       { 
44         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
45       }
46 //    inline void  operator delete(void *anAddress, size_t size) 
47 //      { 
48 //        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
49 //      }
50     Handle(SALOMEDS_TableOfRealAttribute)():Handle(TDF_Attribute)() {} 
51     Handle(SALOMEDS_TableOfRealAttribute)(const Handle(SALOMEDS_TableOfRealAttribute)& aHandle) : Handle(TDF_Attribute)(aHandle) 
52      {
53      }
54
55     Handle(SALOMEDS_TableOfRealAttribute)(const SALOMEDS_TableOfRealAttribute* anItem) : Handle(TDF_Attribute)((TDF_Attribute *)anItem) 
56      {
57      }
58
59     Handle(SALOMEDS_TableOfRealAttribute)& operator=(const Handle(SALOMEDS_TableOfRealAttribute)& aHandle)
60      {
61       Assign(aHandle.Access());
62       return *this;
63      }
64
65     Handle(SALOMEDS_TableOfRealAttribute)& operator=(const SALOMEDS_TableOfRealAttribute* anItem)
66      {
67       Assign((Standard_Transient *)anItem);
68       return *this;
69      }
70
71     SALOMEDS_TableOfRealAttribute* operator->() 
72      {
73       return (SALOMEDS_TableOfRealAttribute *)ControlAccess();
74      }
75
76     SALOMEDS_TableOfRealAttribute* operator->() const 
77      {
78       return (SALOMEDS_TableOfRealAttribute *)ControlAccess();
79      }
80
81    Standard_EXPORT ~Handle(SALOMEDS_TableOfRealAttribute)();
82  
83    Standard_EXPORT static const Handle(SALOMEDS_TableOfRealAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
84 };
85 #endif