Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
[modules/shaper.git] / src / Model / Model_Data.h
index 6604e86e8a246dfce43bccf065e6944fb5637dfc..5a2f6296e1a385745534e42fd2c56312aa4be27a 100644 (file)
@@ -17,6 +17,7 @@
 #include <ModelAPI_AttributeReference.h>
 #include <ModelAPI_AttributeRefList.h>
 #include <ModelAPI_AttributeString.h>
+#include <ModelAPI_AttributeIntArray.h>
 #include <ModelAPI_Data.h>
 #include <ModelAPI_Feature.h>
 #include <ModelAPI_Object.h>
@@ -100,6 +101,10 @@ class Model_Data : public ModelAPI_Data
   /// Returns the attribute that contains real value with double precision
   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeString>
     string(const std::string& theID);
+  /// Returns the attribute that contains integer values array
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_AttributeIntArray>
+    intArray(const std::string& theID);
+
   /// Returns the generic attribute by identifier
   /// \param theID identifier of the attribute
   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Attribute> attribute(const std::string& theID);
@@ -129,7 +134,9 @@ class Model_Data : public ModelAPI_Data
   /// for each attribute of the object
   /// \param theID identifier of the attribute that can be referenced by this ID later
   /// \param theAttrType type of the created attribute (received from the type method)
-  MODEL_EXPORT virtual void addAttribute(const std::string& theID, const std::string theAttrType);
+  /// \returns the just created attribute
+  MODEL_EXPORT virtual AttributePtr 
+    addAttribute(const std::string& theID, const std::string theAttrType);
 
   /// Useful method for "set" methods of the attributes: sends an UPDATE event and
   /// makes attribute initialized
@@ -169,6 +176,9 @@ class Model_Data : public ModelAPI_Data
   MODEL_EXPORT virtual void referencesToObjects(
     std::list<std::pair<std::string, std::list<ObjectPtr> > >& theRefs);
 
+  /// Copies all atributes content into theTarget data
+  MODEL_EXPORT virtual void copyTo(std::shared_ptr<ModelAPI_Data> theTarget);
+
 private:
   /// removes all information about back references
   void eraseBackReferences();