Salome HOME
Fix for the issue #2808 : Documentation on the "Groups" panel. Added description...
[modules/shaper.git] / src / ModelAPI / ModelAPI_AttributeTables.h
index 1fe3e9614d694dcb0de79f5f8f97c826e6f22e66..e1a4f5f4a40a655ece8d06546cdb353ffcfc04c7 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        ModelAPI_AttributeTables.h
-// Created:     14 Nov 2016
-// Author:      Mikhail Ponikarov
+// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
 
 #ifndef ModelAPI_AttributeTables_H_
 #define ModelAPI_AttributeTables_H_
@@ -18,7 +32,7 @@
 ///
 /// The type of values can be changed. But all the values in the tables must have the same one
 /// type. The currently allowed types now are: Boolean, Integer, Double, String.
-/// By default there is only one table, but it may be increased/decreased by adding/removing 
+/// By default there is only one table, but it may be increased/decreased by adding/removing
 /// tables one by one.
 /// The number of rows and columns are equal in all tables. If table, row or column is added,
 /// the previous values are kept unchanged. New cells are filled by zero, false or empty strings.
@@ -55,13 +69,17 @@ public:
   /// Defines the tyoe of values in the table. If it differs from the current, erases the content.
   MODELAPI_EXPORT virtual void setType(ValueType theType) = 0;
   /// Defines the tyoe of values in the table. If it differs from the current, erases the content.
-  MODELAPI_EXPORT virtual const ValueType& type(ValueType) const = 0;
+  MODELAPI_EXPORT virtual const ValueType& type() const = 0;
   /// Defines the value by the index in the tables set (indexes are zero-based).
   MODELAPI_EXPORT virtual void setValue(
-    const Value theValue, const int theRow, const int theColumn, const int theTable = 1) = 0;
+    const Value theValue, const int theRow, const int theColumn, const int theTable = 0) = 0;
   /// Returns the value by the index (indexes are zero-based).
   MODELAPI_EXPORT virtual Value value(
-    const int theRow, const int theColumn, const int theTable = 1) = 0;
+    const int theRow, const int theColumn, const int theTable = 0) = 0;
+
+  /// Returns the value in the format of string (usefull for the python connection)
+  MODELAPI_EXPORT virtual std::string valueStr(
+    const int theRow, const int theColumn, const int theTable = 0) = 0;
 
   /// Returns the type of this class of attributes
   MODELAPI_EXPORT static std::string typeId()