Back to index

salome-kernel  6.5.0
SALOMEDSClient_AttributeTable.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 //  File   : SALOMEDSClient_AttributeTable.hxx
00021 //  Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
00022 //
00023 #ifndef SALOMEDSClient_AttributeTable_HeaderFile
00024 #define SALOMEDSClient_AttributeTable_HeaderFile
00025 
00026 #include <vector>
00027 #include <string>
00028 #include "SALOMEDSClient_definitions.hxx" 
00029 #include "SALOMEDSClient_GenericAttribute.hxx" 
00030 
00031 class SALOMEDSClient_AttributeTable: public virtual SALOMEDSClient_GenericAttribute
00032 {
00033 public:
00034   typedef enum { 
00035     AscendingOrder,
00036     DescendingOrder,
00037   } SortOrder;
00038 
00039   typedef enum {
00040     EmptyLowest,
00041     EmptyHighest,
00042     EmptyFirst,
00043     EmptyLast,
00044     EmptyIgnore,
00045   } SortPolicy;
00046 
00047   virtual void SetTitle(const std::string& theTitle) = 0;
00048   virtual std::string GetTitle() = 0;
00049   virtual void SetRowTitle(int theIndex, const std::string& theTitle) = 0;
00050   virtual std::string GetRowTitle(int theIndex) = 0;
00051   virtual void SetRowTitles(const std::vector<std::string>& theTitles) = 0;
00052   virtual std::vector<std::string> GetRowTitles() = 0;
00053   virtual void SetColumnTitle(int theIndex, const std::string& theTitle) = 0;
00054   virtual std::string GetColumnTitle(int theIndex) = 0;
00055   virtual void SetColumnTitles(const std::vector<std::string>& theTitles) = 0;
00056   virtual std::vector<std::string> GetColumnTitles() = 0;
00057   virtual void SetRowUnit(int theIndex, const std::string& theUnit) = 0;
00058   virtual std::string GetRowUnit(int theIndex) = 0;
00059   virtual void SetRowUnits(const std::vector<std::string>& theUnits) = 0;
00060   virtual std::vector<std::string> GetRowUnits() = 0;
00061 
00062   virtual int GetNbRows() = 0;
00063   virtual int GetNbColumns() = 0;
00064   virtual bool HasValue(int theRow, int theColumn) = 0;
00065   virtual void RemoveValue(int theRow, int theColumn) = 0;
00066 
00067   virtual std::vector<int> GetRowSetIndices(int theRow) = 0;
00068   virtual void SetNbColumns(int theNbColumns) = 0;
00069 
00070   virtual std::vector<int> SortRow(int theRow, SortOrder theOrder, SortPolicy thePolicy) = 0;
00071   virtual std::vector<int> SortColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy) = 0;
00072   virtual std::vector<int> SortByRow(int theRow, SortOrder theOrder, SortPolicy thePolicy) = 0;
00073   virtual std::vector<int> SortByColumn(int theColumn, SortOrder theOrder, SortPolicy thePolicy) = 0;
00074   virtual void SwapCells(int theRow1, int theColumn1, int theRow2, int theColumn2) = 0;
00075   virtual void SwapRows(int theRow1, int theRow2) = 0;
00076   virtual void SwapColumns(int theColumn1, int theColumn2) = 0;
00077 };
00078 
00079 #endif // SALOMEDSClient_AttributeTable_HeaderFile