Salome HOME
NRI : Temporary modification for reading catalog of modules.
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_TableOfRealAttribute.hxx
1 //  File      : SALOMEDS_TableOfRealAttribute.hxx
2 //  Created   : Tue Oct  8 10:13:30 2002
3 //  Author    : Michael Ponikarov
4 //  Project   : SALOME
5 //  Module    : SALOMEDS
6 //  Copyright : Open CASCADE
7 //  $Header$
8
9 #ifndef _SALOMEDS_TableOfRealAttribute_HeaderFile
10 #define _SALOMEDS_TableOfRealAttribute_HeaderFile
11
12 #ifndef _Standard_HeaderFile
13 #include <Standard.hxx>
14 #endif
15 #ifndef _Handle_SALOMEDS_TableOfRealAttribute_HeaderFile
16 #include <Handle_SALOMEDS_TableOfRealAttribute.hxx>
17 #endif
18
19 #ifndef _TColStd_SequenceOfTransient_HeaderFile
20 #include <TColStd_SequenceOfTransient.hxx>
21 #endif
22 #ifndef _TCollection_ExtendedString_HeaderFile
23 #include <TCollection_ExtendedString.hxx>
24 #endif
25 #ifndef _Handle_TColStd_HSequenceOfExtendedString_HeaderFile
26 #include <Handle_TColStd_HSequenceOfExtendedString.hxx>
27 #endif
28
29 #ifndef _TColStd_DataMapOfIntegerReal_HeaderFile
30 #include <TColStd_DataMapOfIntegerReal.hxx>
31 #endif
32
33 #ifndef _TDF_Attribute_HeaderFile
34 #include <TDF_Attribute.hxx>
35 #endif
36 #ifndef _Standard_Integer_HeaderFile
37 #include <Standard_Integer.hxx>
38 #endif
39
40 #ifndef _Handle_TColStd_HSequenceOfInteger_HeaderFile
41 #include <Handle_TColStd_HSequenceOfInteger.hxx>
42 #endif 
43
44 #ifndef TColStd_HSequenceOfInteger_HeaderFile
45 #include <TColStd_HSequenceOfInteger.hxx>
46 #endif 
47
48 #ifndef _Handle_TColStd_HSequenceOfReal_HeaderFile
49 #include <Handle_TColStd_HSequenceOfReal.hxx>
50 #endif
51 #ifndef _Standard_Boolean_HeaderFile
52 #include <Standard_Boolean.hxx>
53 #endif
54 #ifndef _Handle_TDF_Attribute_HeaderFile
55 #include <Handle_TDF_Attribute.hxx>
56 #endif
57 #ifndef _Handle_TDF_RelocationTable_HeaderFile
58 #include <Handle_TDF_RelocationTable.hxx>
59 #endif
60 class TColStd_HSequenceOfExtendedString;
61 class Standard_GUID;
62 class TDF_Label;
63 class TCollection_ExtendedString;
64 class TColStd_HSequenceOfReal;
65 class TDF_Attribute;
66 class TDF_RelocationTable;
67
68 #include <strstream>
69
70 class SALOMEDS_TableOfRealAttribute : public TDF_Attribute {
71
72 public:
73
74     inline void* operator new(size_t,void* anAddress) 
75       {
76         return anAddress;
77       }
78     inline void* operator new(size_t size) 
79       { 
80         return Standard::Allocate(size); 
81       }
82     inline void  operator delete(void *anAddress) 
83       { 
84         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
85       }
86 //    inline void  operator delete(void *anAddress, size_t size) 
87 //      { 
88 //        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
89 //      }
90  // Methods PUBLIC
91  // 
92 Standard_EXPORT static const Standard_GUID& GetID() ;
93 Standard_EXPORT static  Handle_SALOMEDS_TableOfRealAttribute Set(const TDF_Label& label) ;
94 Standard_EXPORT SALOMEDS_TableOfRealAttribute();
95 Standard_EXPORT   void SetNbColumns(const Standard_Integer theNbColumns);
96 Standard_EXPORT   void SetTitle(const TCollection_ExtendedString& theTitle) ;
97 Standard_EXPORT   TCollection_ExtendedString GetTitle() const;
98 Standard_EXPORT   void SetRowData(const Standard_Integer theRow,const Handle(TColStd_HSequenceOfReal)& theData) ;
99 Standard_EXPORT   Handle_TColStd_HSequenceOfReal GetRowData(const Standard_Integer theRow) ;
100 Standard_EXPORT   void SetRowTitle(const Standard_Integer theRow,const TCollection_ExtendedString& theTitle) ;
101 Standard_EXPORT   TCollection_ExtendedString GetRowTitle(const Standard_Integer theRow) const;
102 Standard_EXPORT   void SetColumnData(const Standard_Integer theColumn,const Handle(TColStd_HSequenceOfReal)& theData) ;
103 Standard_EXPORT   Handle_TColStd_HSequenceOfReal GetColumnData(const Standard_Integer theColumn) ;
104 Standard_EXPORT   void SetColumnTitle(const Standard_Integer theColumn,const TCollection_ExtendedString& theTitle) ;
105 Standard_EXPORT   TCollection_ExtendedString GetColumnTitle(const Standard_Integer theColumn) const;
106 Standard_EXPORT   Standard_Integer GetNbRows() const;
107 Standard_EXPORT   Standard_Integer GetNbColumns() const;
108
109 Standard_EXPORT   void PutValue(const Standard_Real theValue,const Standard_Integer theRow,const Standard_Integer theColumn) ;
110 Standard_EXPORT   Standard_Boolean HasValue(const Standard_Integer theRow,const Standard_Integer theColumn) ;
111 Standard_EXPORT   Standard_Real GetValue(const Standard_Integer theRow,const Standard_Integer theColumn) ;
112 Standard_EXPORT  const Standard_GUID& ID() const;
113 Standard_EXPORT   void Restore(const Handle(TDF_Attribute)& with) ;
114 Standard_EXPORT   Handle_TDF_Attribute NewEmpty() const;
115 Standard_EXPORT   void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
116
117 Standard_EXPORT   Handle_TColStd_HSequenceOfInteger GetSetRowIndices(const Standard_Integer theRow);
118 Standard_EXPORT   Handle_TColStd_HSequenceOfInteger GetSetColumnIndices(const Standard_Integer theColumn);
119
120 Standard_EXPORT   void ConvertToString(ostrstream& theStream);
121 Standard_EXPORT   bool RestoreFromString(istrstream& theStream);
122
123 Standard_EXPORT ~SALOMEDS_TableOfRealAttribute();
124
125
126
127
128  // Type management
129  //
130  Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_TableOfRealAttribute_Type_();
131  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
132  Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
133
134 protected:
135
136  // Methods PROTECTED
137  // 
138
139
140  // Fields PROTECTED
141  //
142
143 private: 
144
145  // Methods PRIVATE
146  // 
147
148
149  // Fields PRIVATE
150  //
151 TColStd_DataMapOfIntegerReal myTable;
152 TCollection_ExtendedString myTitle;
153 Handle_TColStd_HSequenceOfExtendedString myRows;
154 Handle_TColStd_HSequenceOfExtendedString myCols;
155 Standard_Integer myNbRows;
156 Standard_Integer myNbColumns;
157
158 };
159
160
161
162
163
164 // other inline functions and methods (like "C++: function call" methods)
165 //
166
167
168 #endif