Salome HOME
A patch from Paul RASCLE for: kernel documentation with doxygen, modification on...
[modules/kernel.git] / src / SALOMEDSImpl / SALOMEDSImpl_AttributeTableOfInteger.hxx
1 //  SALOME SALOMEDSImpl : data structure of SALOME and sources of Salome data server 
2 //
3 //  Copyright (C) 2003  CEA/DEN, EDF R&D
4 //
5 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
6 //
7 //  File   : SALOMEDSImpl_AttributeTableOfInteger.hxx
8 //  Author : Michael Ponikarov
9 //  Module : SALOME
10
11 #ifndef _SALOMEDSImpl_AttributeTableOfInteger_HeaderFile
12 #define _SALOMEDSImpl_AttributeTableOfInteger_HeaderFile
13
14 #include "DF_Attribute.hxx"
15 #include "DF_Label.hxx"   
16 #include "SALOMEDSImpl_GenericAttribute.hxx"
17
18 #include <string>
19 #include <vector>
20 #include <map>
21
22
23 class SALOMEDSImpl_AttributeTableOfInteger : public SALOMEDSImpl_GenericAttribute 
24 {
25
26 public:
27 Standard_EXPORT virtual std::string Save();
28 Standard_EXPORT virtual void Load(const std::string&); 
29 Standard_EXPORT static const std::string& GetID() ;
30 Standard_EXPORT static SALOMEDSImpl_AttributeTableOfInteger* Set(const DF_Label& label) ;
31 Standard_EXPORT SALOMEDSImpl_AttributeTableOfInteger();
32 Standard_EXPORT   void SetNbColumns(const int theNbColumns);
33 Standard_EXPORT   void SetTitle(const std::string& theTitle) ;
34 Standard_EXPORT   std::string GetTitle() const;
35 Standard_EXPORT   void SetRowData(const int theRow,const std::vector<int>& theData) ;
36 Standard_EXPORT   std::vector<int> GetRowData(const int theRow) ;
37 Standard_EXPORT   void SetRowTitle(const int theRow,const std::string& theTitle) ;
38 Standard_EXPORT   void SetRowUnit(const int theRow,const std::string& theUnit) ;
39 Standard_EXPORT   std::string GetRowUnit(const int theRow) const;
40 Standard_EXPORT   void SetRowUnits(const std::vector<std::string>& theUnits) ;
41 Standard_EXPORT   std::vector<std::string> GetRowUnits();
42 Standard_EXPORT   void SetRowTitles(const std::vector<std::string>& theTitles) ;
43 Standard_EXPORT   std::vector<std::string> GetRowTitles();
44 Standard_EXPORT   std::string GetRowTitle(const int theRow) const;
45 Standard_EXPORT   void SetColumnData(const int theColumn,const std::vector<int>& theData) ;
46 Standard_EXPORT   std::vector<int> GetColumnData(const int theColumn) ;
47 Standard_EXPORT   void SetColumnTitle(const int theColumn,const std::string& theTitle) ;
48 Standard_EXPORT   std::string GetColumnTitle(const int theColumn) const;
49 Standard_EXPORT   void SetColumnTitles(const std::vector<std::string>& theTitles);
50 Standard_EXPORT   std::vector<std::string> GetColumnTitles();
51 Standard_EXPORT   int GetNbRows() const;
52 Standard_EXPORT   int GetNbColumns() const;
53
54 Standard_EXPORT   void PutValue(const int theValue,const int theRow,const int theColumn) ;
55 Standard_EXPORT   bool HasValue(const int theRow,const int theColumn) ;
56 Standard_EXPORT   int GetValue(const int theRow,const int theColumn) ;
57 Standard_EXPORT  const std::string& ID() const;
58 Standard_EXPORT   void Restore(DF_Attribute* with) ;
59 Standard_EXPORT   DF_Attribute* NewEmpty() const;
60 Standard_EXPORT   void Paste(DF_Attribute* into);
61
62 Standard_EXPORT   std::vector<int> GetSetRowIndices(const int theRow);
63 Standard_EXPORT   std::vector<int> GetSetColumnIndices(const int theColumn);
64
65 Standard_EXPORT ~SALOMEDSImpl_AttributeTableOfInteger() {}
66
67 private: 
68
69 std::map<int, int> myTable;
70 std::string myTitle;
71 std::vector<std::string> myRows;
72 std::vector<std::string> myCols;
73 int myNbRows;
74 int myNbColumns;
75
76 };
77
78 #endif