Salome HOME
PR: manual correction while merge PAL_OCC to HEAD
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_PythonObjectAttribute.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   : SALOMEDS_PythonObjectAttribute.hxx
8 //  Author : Michael Ponikarov
9 //  Module : SALOME
10 //  $Header$
11
12 #ifndef _SALOMEDS_PythonObjectAttribute_HeaderFile
13 #define _SALOMEDS_PythonObjectAttribute_HeaderFile
14
15 #ifndef _Standard_HeaderFile
16 #include <Standard.hxx>
17 #endif
18 #ifndef _Handle_SALOMEDS_PythonObjectAttribute_HeaderFile
19 #include <Handle_SALOMEDS_PythonObjectAttribute.hxx>
20 #endif
21
22 #ifndef _Handle_TColStd_HArray1OfCharacter_HeaderFile
23 #include <Handle_TColStd_HArray1OfCharacter.hxx>
24 #endif
25 #ifndef _Standard_Boolean_HeaderFile
26 #include <Standard_Boolean.hxx>
27 #endif
28 #ifndef _TDF_Attribute_HeaderFile
29 #include <TDF_Attribute.hxx>
30 #endif
31 #ifndef _Standard_Integer_HeaderFile
32 #include <Standard_Integer.hxx>
33 #endif
34 #ifndef _Standard_CString_HeaderFile
35 #include <Standard_CString.hxx>
36 #endif
37 #ifndef _Handle_TDF_Attribute_HeaderFile
38 #include <Handle_TDF_Attribute.hxx>
39 #endif
40 #ifndef _Handle_TDF_RelocationTable_HeaderFile
41 #include <Handle_TDF_RelocationTable.hxx>
42 #endif
43 class TColStd_HArray1OfCharacter;
44 class Standard_GUID;
45 class TDF_Label;
46 class TDF_Attribute;
47 class TDF_RelocationTable;
48
49
50 class SALOMEDS_PythonObjectAttribute : public TDF_Attribute {
51
52 public:
53
54     inline void* operator new(size_t,void* anAddress) 
55       {
56         return anAddress;
57       }
58     inline void* operator new(size_t size) 
59       { 
60         return Standard::Allocate(size); 
61       }
62     inline void  operator delete(void *anAddress) 
63       { 
64         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
65       }
66 //    inline void  operator delete(void *anAddress, size_t size) 
67 //      { 
68 //        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
69 //      }
70  // Methods PUBLIC
71  // 
72 Standard_EXPORT static const Standard_GUID& GetID() ;
73 Standard_EXPORT static  Handle_SALOMEDS_PythonObjectAttribute Set(const TDF_Label& label) ;
74 Standard_EXPORT SALOMEDS_PythonObjectAttribute();
75 Standard_EXPORT   void SetObject(const Standard_CString theSequence,const Standard_Boolean theScript) ;
76 Standard_EXPORT   Standard_CString GetObject() const;
77 Standard_EXPORT   Standard_Boolean IsScript() const;
78 Standard_EXPORT   Standard_Integer GetLength() const;
79 Standard_EXPORT  const Standard_GUID& ID() const;
80 Standard_EXPORT   void Restore(const Handle(TDF_Attribute)& with) ;
81 Standard_EXPORT   Handle_TDF_Attribute NewEmpty() const;
82 Standard_EXPORT   void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
83 Standard_EXPORT ~SALOMEDS_PythonObjectAttribute();
84
85
86
87
88  // Type management
89  //
90  Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_PythonObjectAttribute_Type_();
91  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
92  Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
93
94 protected:
95
96  // Methods PROTECTED
97  // 
98
99
100  // Fields PROTECTED
101  //
102
103
104 private: 
105
106  // Methods PRIVATE
107  // 
108
109
110  // Fields PRIVATE
111  //
112 Standard_CString mySequence;
113 Standard_Boolean myIsScript;
114
115
116 };
117
118
119
120
121
122 // other inline functions and methods (like "C++: function call" methods)
123 //
124
125
126 #endif