1 // File : SALOMEDS_TableOfStringAttribute.hxx
2 // Created : Mon Apr 7 10:13:30 2003
3 // Author : Sergey Ruin
6 // Copyright : Open CASCADE
8 #ifndef _SALOMEDS_TableOfStringAttribute_HeaderFile
9 #define _SALOMEDS_TableOfStringAttribute_HeaderFile
11 #ifndef _Standard_HeaderFile
12 #include <Standard.hxx>
14 #ifndef _Handle_SALOMEDS_TableOfStringAttribute_HeaderFile
15 #include <Handle_SALOMEDS_TableOfStringAttribute.hxx>
18 #ifndef _TColStd_SequenceOfTransient_HeaderFile
19 #include <TColStd_SequenceOfTransient.hxx>
21 #ifndef _TCollection_ExtendedString_HeaderFile
22 #include <TCollection_ExtendedString.hxx>
24 #ifndef _Handle_TColStd_HSequenceOfExtendedString_HeaderFile
25 #include <Handle_TColStd_HSequenceOfExtendedString.hxx>
28 #ifndef _SALOMEDS_DataMapOfIntegerString_HeaderFile
29 #include <SALOMEDS_DataMapOfIntegerString.hxx>
32 #ifndef _TDF_Attribute_HeaderFile
33 #include <TDF_Attribute.hxx>
35 #ifndef _Standard_Integer_HeaderFile
36 #include <Standard_Integer.hxx>
39 #ifndef _Handle_TColStd_HSequenceOfInteger_HeaderFile
40 #include <Handle_TColStd_HSequenceOfInteger.hxx>
43 #ifndef TColStd_HSequenceOfInteger_HeaderFile
44 #include <TColStd_HSequenceOfInteger.hxx>
47 #ifndef _Handle_TColStd_HSequenceOfExtendedString_HeaderFile
48 #include <Handle_TColStd_HSequenceOfExtendedString.hxx>
50 #ifndef _Standard_Boolean_HeaderFile
51 #include <Standard_Boolean.hxx>
53 #ifndef _Handle_TDF_Attribute_HeaderFile
54 #include <Handle_TDF_Attribute.hxx>
56 #ifndef _Handle_TDF_RelocationTable_HeaderFile
57 #include <Handle_TDF_RelocationTable.hxx>
59 class TColStd_HSequenceOfExtendedString;
62 class TCollection_ExtendedString;
63 class TColStd_HSequenceOfExtendedString;
65 class TDF_RelocationTable;
69 class SALOMEDS_TableOfStringAttribute : public TDF_Attribute {
73 inline void* operator new(size_t,void* anAddress)
77 inline void* operator new(size_t size)
79 return Standard::Allocate(size);
81 inline void operator delete(void *anAddress)
83 if (anAddress) Standard::Free((Standard_Address&)anAddress);
85 // inline void operator delete(void *anAddress, size_t size)
87 // if (anAddress) Standard::Free((Standard_Address&)anAddress,size);
91 Standard_EXPORT static const Standard_GUID& GetID() ;
92 Standard_EXPORT static Handle_SALOMEDS_TableOfStringAttribute Set(const TDF_Label& label) ;
93 Standard_EXPORT SALOMEDS_TableOfStringAttribute();
94 Standard_EXPORT void SetNbColumns(const Standard_Integer theNbColumns);
95 Standard_EXPORT void SetTitle(const TCollection_ExtendedString& theTitle) ;
96 Standard_EXPORT TCollection_ExtendedString GetTitle() const;
97 Standard_EXPORT void SetRowData(const Standard_Integer theRow,const Handle(TColStd_HSequenceOfExtendedString)& theData) ;
98 Standard_EXPORT Handle_TColStd_HSequenceOfExtendedString GetRowData(const Standard_Integer theRow) ;
99 Standard_EXPORT void SetRowTitle(const Standard_Integer theRow,const TCollection_ExtendedString& theTitle) ;
100 Standard_EXPORT TCollection_ExtendedString GetRowTitle(const Standard_Integer theRow) const;
101 Standard_EXPORT void SetColumnData(const Standard_Integer theColumn,const Handle(TColStd_HSequenceOfExtendedString)& theData) ;
102 Standard_EXPORT Handle_TColStd_HSequenceOfExtendedString GetColumnData(const Standard_Integer theColumn) ;
103 Standard_EXPORT void SetColumnTitle(const Standard_Integer theColumn,const TCollection_ExtendedString& theTitle) ;
104 Standard_EXPORT TCollection_ExtendedString GetColumnTitle(const Standard_Integer theColumn) const;
105 Standard_EXPORT Standard_Integer GetNbRows() const;
106 Standard_EXPORT Standard_Integer GetNbColumns() const;
108 Standard_EXPORT void PutValue(const TCollection_ExtendedString& theValue,const Standard_Integer theRow,const Standard_Integer theColumn) ;
109 Standard_EXPORT Standard_Boolean HasValue(const Standard_Integer theRow,const Standard_Integer theColumn) ;
110 Standard_EXPORT TCollection_ExtendedString GetValue(const Standard_Integer theRow,const Standard_Integer theColumn) ;
111 Standard_EXPORT const Standard_GUID& ID() const;
112 Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
113 Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
114 Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
116 Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetRowIndices(const Standard_Integer theRow);
117 Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetColumnIndices(const Standard_Integer theColumn);
119 Standard_EXPORT void ConvertToString(ostrstream& theStream);
120 Standard_EXPORT bool RestoreFromString(istrstream& theStream);
122 Standard_EXPORT ~SALOMEDS_TableOfStringAttribute();
129 Standard_EXPORT friend Handle_Standard_Type& SALOMEDS_TableOfStringAttribute_Type_();
130 Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
131 Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
150 SALOMEDS_DataMapOfIntegerString myTable;
151 TCollection_ExtendedString myTitle;
152 Handle_TColStd_HSequenceOfExtendedString myRows;
153 Handle_TColStd_HSequenceOfExtendedString myCols;
154 Standard_Integer myNbRows;
155 Standard_Integer myNbColumns;
163 // other inline functions and methods (like "C++: function call" methods)