Salome HOME
Issue #2365 problem with active panel in feature and Hide faces windows
[modules/shaper.git] / src / CollectionAPI / CollectionAPI_Field.h
index 8f0b5ecab28541d3843d5ff2e6ef62d26afdfbd2..3753d57682f74b83975a5e274263d9fc3b65c3fa 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
-
-// File:        CollectionAPI_Field.h
-// Created:     16 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 CollectionAPI_Field_H_
 #define CollectionAPI_Field_H_
@@ -33,17 +47,11 @@ public:
   COLLECTIONAPI_EXPORT
   virtual ~CollectionAPI_Field();
 
-  INTERFACE_7(CollectionPlugin_Field::ID(),
+  INTERFACE_4(CollectionPlugin_Field::ID(),
     selection, CollectionPlugin_Field::SELECTED_ID(),
     ModelAPI_AttributeSelectionList, /** Field selection list*/,
-    componentsNum, CollectionPlugin_Field::COMPONENTS_NB_ID(),
-    ModelAPI_AttributeInteger, /** Number of components integer */,
     componentsNames, CollectionPlugin_Field::COMPONENTS_NAMES_ID(),
     ModelAPI_AttributeStringArray, /** Names of components list of strings */,
-    valuesType, CollectionPlugin_Field::VALUES_TYPE_ID(),
-    ModelAPI_AttributeInteger, /** Type of the values enumeration */,
-    stepsNum, CollectionPlugin_Field::STEPS_NB_ID(),
-    ModelAPI_AttributeInteger, /** Number of steps integer */,
     stamps, CollectionPlugin_Field::STAMPS_ID(),
     ModelAPI_AttributeIntArray, /** Identifiers of stamps */,
     values, CollectionPlugin_Field::VALUES_ID(), ModelAPI_AttributeTables /** Table of values */,
@@ -52,9 +60,6 @@ public:
   /// Set selected objects.
   COLLECTIONAPI_EXPORT
   void setSelection(const std::list<ModelHighAPI_Selection>& theFieldList);
-  /// Set number of components
-  COLLECTIONAPI_EXPORT
-  void setComponentsNum(const ModelHighAPI_Integer& theNum);
   /// Set names of components
   COLLECTIONAPI_EXPORT
   void setComponentsNames(const std::list<std::string>& theNames);
@@ -67,14 +72,31 @@ public:
   /// Set stamps identifiers
   COLLECTIONAPI_EXPORT
   void setStamps(const std::list<ModelHighAPI_Integer>& theStamps);
-  /// Sets the values of specific step
+  /// Sets the double values of specific step
+  COLLECTIONAPI_EXPORT
+  void addStep(const ModelHighAPI_Integer& theStepNum, const ModelHighAPI_Integer& theStamp,
+    const std::list<std::list<double> >& theComponents);
+  /// Sets the integer values of specific step
+  COLLECTIONAPI_EXPORT
+  void addStep(const ModelHighAPI_Integer& theStepNum, const ModelHighAPI_Integer& theStamp,
+    const std::list<std::list<int> >& theComponents);
+  /// Sets the string values of specific step
   COLLECTIONAPI_EXPORT
   void addStep(const ModelHighAPI_Integer& theStepNum, const ModelHighAPI_Integer& theStamp,
-    const std::list<std::list<ModelHighAPI_ComponentValue> >& theComponents);
+    const std::list<std::list<std::string> >& theComponents);
+  /// Sets the boolean values of specific step
+  COLLECTIONAPI_EXPORT
+  void addStep(const ModelHighAPI_Integer& theStepNum, const ModelHighAPI_Integer& theStamp,
+    const std::list<std::list<bool> >& theComponents);
 
   /// Dump wrapped feature
   COLLECTIONAPI_EXPORT
   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
+
+  /// Returns the internal values tables
+  COLLECTIONAPI_EXPORT
+  std::shared_ptr<ModelAPI_AttributeTables> tableValues();
+
 };
 
 /// Pointer on Field object.
@@ -85,7 +107,7 @@ typedef std::shared_ptr<CollectionAPI_Field> FieldPtr;
 COLLECTIONAPI_EXPORT
 FieldPtr addField(const std::shared_ptr<ModelAPI_Document>& thePart,
                   const ModelHighAPI_Integer& theStepsNum,
-                  std::string& theComponentType,
+                  const std::string& theComponentType,
                   const int theComponentsNum,
                   const std::list<std::string>& theComponentNames,
                   const std::list<ModelHighAPI_Selection>& theSelectionList);