Salome HOME
Moved some functionality to VTKViewer_Utilities.h
[modules/kernel.git] / src / SALOMEDS / Handle_SALOMEDS_TableOfStringAttribute.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_TableOfStringAttribute.hxx
8 //  Author : Sergey Ruin
9 //  Module : SALOME
10
11 #ifndef _Handle_SALOMEDS_TableOfStringAttribute_HeaderFile
12 #define _Handle_SALOMEDS_TableOfStringAttribute_HeaderFile
13
14 #ifndef _Standard_Macro_HeaderFile
15 #include <Standard_Macro.hxx>
16 #endif
17 #ifndef _Standard_HeaderFile
18 #include <Standard.hxx>
19 #endif
20
21 #ifndef _Handle_TDF_Attribute_HeaderFile
22 #include <Handle_TDF_Attribute.hxx>
23 #endif
24
25 class Standard_Transient;
26 class Handle_Standard_Type;
27 class Handle(TDF_Attribute);
28 class SALOMEDS_TableOfStringAttribute;
29 Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOMEDS_TableOfStringAttribute);
30
31 class Handle(SALOMEDS_TableOfStringAttribute) : public Handle(TDF_Attribute) {
32   public:
33     inline void* operator new(size_t,void* anAddress) 
34       {
35         return anAddress;
36       }
37     inline void* operator new(size_t size) 
38       { 
39         return Standard::Allocate(size); 
40       }
41     inline void  operator delete(void *anAddress) 
42       { 
43         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
44       }
45 //    inline void  operator delete(void *anAddress, size_t size) 
46 //      { 
47 //        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
48 //      }
49     Handle(SALOMEDS_TableOfStringAttribute)():Handle(TDF_Attribute)() {} 
50     Handle(SALOMEDS_TableOfStringAttribute)(const Handle(SALOMEDS_TableOfStringAttribute)& aHandle) : Handle(TDF_Attribute)(aHandle) 
51      {
52      }
53
54     Handle(SALOMEDS_TableOfStringAttribute)(const SALOMEDS_TableOfStringAttribute* anItem) : Handle(TDF_Attribute)((TDF_Attribute *)anItem) 
55      {
56      }
57
58     Handle(SALOMEDS_TableOfStringAttribute)& operator=(const Handle(SALOMEDS_TableOfStringAttribute)& aHandle)
59      {
60       Assign(aHandle.Access());
61       return *this;
62      }
63
64     Handle(SALOMEDS_TableOfStringAttribute)& operator=(const SALOMEDS_TableOfStringAttribute* anItem)
65      {
66       Assign((Standard_Transient *)anItem);
67       return *this;
68      }
69
70     SALOMEDS_TableOfStringAttribute* operator->() 
71      {
72       return (SALOMEDS_TableOfStringAttribute *)ControlAccess();
73      }
74
75     SALOMEDS_TableOfStringAttribute* operator->() const 
76      {
77       return (SALOMEDS_TableOfStringAttribute *)ControlAccess();
78      }
79
80    Standard_EXPORT ~Handle(SALOMEDS_TableOfStringAttribute)();
81  
82    Standard_EXPORT static const Handle(SALOMEDS_TableOfStringAttribute) DownCast(const Handle(Standard_Transient)& AnObject);
83 };
84 #endif