1 // SALOME SALOMEDSImpl : data structure of SALOME and sources of Salome data server
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
5 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
7 // File : SALOMEDSImpl_AttributeTableOfInteger.hxx
8 // Author : Michael Ponikarov
11 #ifndef _SALOMEDSImpl_AttributeTableOfInteger_HeaderFile
12 #define _SALOMEDSImpl_AttributeTableOfInteger_HeaderFile
14 #include <Standard_DefineHandle.hxx>
15 #include <Standard.hxx>
16 #include <TDF_Attribute.hxx>
17 #include <TDF_Label.hxx>
18 #include "SALOMEDSImpl_GenericAttribute.hxx"
21 class Handle(TDF_Attribute);
22 class Handle(TDF_RelocationTable);
24 #include <TColStd_SequenceOfTransient.hxx>
25 #include <TCollection_ExtendedString.hxx>
26 #include <Handle_TColStd_HSequenceOfExtendedString.hxx>
27 #include <TColStd_DataMapOfIntegerInteger.hxx>
28 #include <TColStd_HSequenceOfInteger.hxx>
30 #include <TCollection_AsciiString.hxx>
32 DEFINE_STANDARD_HANDLE( SALOMEDSImpl_AttributeTableOfInteger, SALOMEDSImpl_GenericAttribute )
34 class SALOMEDSImpl_AttributeTableOfInteger : public SALOMEDSImpl_GenericAttribute
38 Standard_EXPORT virtual TCollection_AsciiString Save();
39 Standard_EXPORT virtual void Load(const TCollection_AsciiString&);
40 Standard_EXPORT static const Standard_GUID& GetID() ;
41 Standard_EXPORT static Handle_SALOMEDSImpl_AttributeTableOfInteger Set(const TDF_Label& label) ;
42 Standard_EXPORT SALOMEDSImpl_AttributeTableOfInteger();
43 Standard_EXPORT void SetNbColumns(const Standard_Integer theNbColumns);
44 Standard_EXPORT void SetTitle(const TCollection_ExtendedString& theTitle) ;
45 Standard_EXPORT TCollection_ExtendedString GetTitle() const;
46 Standard_EXPORT void SetRowData(const Standard_Integer theRow,const Handle(TColStd_HSequenceOfInteger)& theData) ;
47 Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetRowData(const Standard_Integer theRow) ;
48 Standard_EXPORT void SetRowTitle(const Standard_Integer theRow,const TCollection_ExtendedString& theTitle) ;
49 Standard_EXPORT void SetRowUnit(const Standard_Integer theRow,const TCollection_ExtendedString& theUnit) ;
50 Standard_EXPORT TCollection_ExtendedString GetRowUnit(const Standard_Integer theRow) const;
51 Standard_EXPORT void SetRowUnits(const Handle(TColStd_HSequenceOfExtendedString)& theUnits) ;
52 Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetRowUnits();
53 Standard_EXPORT void SetRowTitles(const Handle(TColStd_HSequenceOfExtendedString)& theTitles) ;
54 Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetRowTitles();
55 Standard_EXPORT TCollection_ExtendedString GetRowTitle(const Standard_Integer theRow) const;
56 Standard_EXPORT void SetColumnData(const Standard_Integer theColumn,const Handle(TColStd_HSequenceOfInteger)& theData) ;
57 Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetColumnData(const Standard_Integer theColumn) ;
58 Standard_EXPORT void SetColumnTitle(const Standard_Integer theColumn,const TCollection_ExtendedString& theTitle) ;
59 Standard_EXPORT TCollection_ExtendedString GetColumnTitle(const Standard_Integer theColumn) const;
60 Standard_EXPORT void SetColumnTitles(const Handle(TColStd_HSequenceOfExtendedString)& theTitles);
61 Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetColumnTitles();
62 Standard_EXPORT Standard_Integer GetNbRows() const;
63 Standard_EXPORT Standard_Integer GetNbColumns() const;
65 Standard_EXPORT void PutValue(const Standard_Integer theValue,const Standard_Integer theRow,const Standard_Integer theColumn) ;
66 Standard_EXPORT Standard_Boolean HasValue(const Standard_Integer theRow,const Standard_Integer theColumn) ;
67 Standard_EXPORT Standard_Integer GetValue(const Standard_Integer theRow,const Standard_Integer theColumn) ;
68 Standard_EXPORT const Standard_GUID& ID() const;
69 Standard_EXPORT void Restore(const Handle(TDF_Attribute)& with) ;
70 Standard_EXPORT Handle_TDF_Attribute NewEmpty() const;
71 Standard_EXPORT void Paste(const Handle(TDF_Attribute)& into,const Handle(TDF_RelocationTable)& RT) const;
73 Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetRowIndices(const Standard_Integer theRow);
74 Standard_EXPORT Handle_TColStd_HSequenceOfInteger GetSetColumnIndices(const Standard_Integer theColumn);
76 Standard_EXPORT void ConvertToString(ostrstream& theStream);
77 Standard_EXPORT bool RestoreFromString(istrstream& theStream);
79 Standard_EXPORT ~SALOMEDSImpl_AttributeTableOfInteger() {}
83 TColStd_DataMapOfIntegerInteger myTable;
84 TCollection_ExtendedString myTitle;
85 Handle_TColStd_HSequenceOfExtendedString myRows;
86 Handle_TColStd_HSequenceOfExtendedString myCols;
87 Standard_Integer myNbRows;
88 Standard_Integer myNbColumns;
91 DEFINE_STANDARD_RTTI( SALOMEDSImpl_AttributeTableOfInteger )