Salome HOME
Merge remote-tracking branch 'remotes/origin/master'
[modules/shaper.git] / src / Model / Model_Data.h
index f78f2d26303861d3c3a29546ceedc7362087de55..a5f9af4ed2c6eaf203f571db5eb1fca36ce2e28c 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        Model_Data.hxx
-// Created:     21 Mar 2014
-// 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 Model_Data_H_
 #define Model_Data_H_
@@ -18,6 +32,7 @@
 #include <ModelAPI_AttributeRefList.h>
 #include <ModelAPI_AttributeRefAttrList.h>
 #include <ModelAPI_AttributeString.h>
+#include <ModelAPI_AttributeStringArray.h>
 #include <ModelAPI_AttributeIntArray.h>
 #include <ModelAPI_Data.h>
 #include <ModelAPI_Feature.h>
@@ -76,6 +91,7 @@ class Model_Data : public ModelAPI_Data
   friend class Model_AttributeSelectionList;
   friend class Model_ValidatorsFactory;
   friend class Model_SelectionNaming;
+  friend class Model_ResultConstruction;
 
  public:
   /// The simplest constructor. "setLabel" must be called just after to initialize correctly.
@@ -122,6 +138,12 @@ class Model_Data : public ModelAPI_Data
   /// Returns the attribute that contains integer values array
   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeIntArray>
     intArray(const std::string& theID);
+  /// Returns the attribute that contains string values array
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeStringArray>
+    stringArray(const std::string& theID);
+  /// Returns the attribute that contains string values array
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeTables>
+    tables(const std::string& theID);
 
   /// Returns the generic attribute by identifier
   /// \param theID identifier of the attribute
@@ -164,7 +186,8 @@ class Model_Data : public ModelAPI_Data
   /// \param theSendMessage if false, it does not send the update message
   ///            even if something is changed
   ///            (normally is it used in attributeChanged because this message will be sent anyway)
-  MODEL_EXPORT virtual void blockSendAttributeUpdated(
+  /// \returns the previous state of block
+  MODEL_EXPORT virtual bool blockSendAttributeUpdated(
     const bool theBlock, const bool theSendMessage = true);
 
   /// Puts feature to the document data sub-structure