Salome HOME
Update Filters data model using the previous filters implementation: filter arguments...
[modules/shaper.git] / src / Model / Model_Data.h
index 48ec4faae8d0607d7c9c836d0c9b59f98de2cf1e..58c97bd4e81ef249f703ea71f88408b042c53805 100644 (file)
@@ -180,9 +180,29 @@ 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)
+  /// \param theIndex index of the attribute in the internal data structure, for not-floating
+  ///                 attributes it is -1 to let it automatically be added
   /// \returns the just created attribute
   MODEL_EXPORT virtual AttributePtr
-    addAttribute(const std::string& theID, const std::string theAttrType);
+    addAttribute(const std::string& theID, const std::string theAttrType, const int theIndex = -1);
+
+  /// Adds a floating attribute (that may be added/removed during the data life)
+  /// \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)
+  /// \param theGroup identifier of the group this attribute belongs to, may be an empty string
+  MODEL_EXPORT virtual AttributePtr
+    addFloatingAttribute(const std::string& theID, const std::string theAttrType,
+      const std::string& theGroup);
+
+  /// Returns all groups of this data (ordered).
+  MODEL_EXPORT virtual void allGroups(std::list<std::string>& theGroups);
+
+  /// Returns an ordered list of attributes that belong to the given group
+  MODEL_EXPORT virtual void attributesOfGroup(const std::string& theGroup,
+    std::list<std::shared_ptr<ModelAPI_Attribute> >& theAttrs);
+
+  /// Remove all attributes of the given group
+  MODEL_EXPORT virtual void removeAttributes(const std::string& theGroup);
 
   /// Useful method for "set" methods of the attributes: sends an UPDATE event and
   /// makes attribute initialized