Salome HOME
Several improvement of the filters functionality, correct work with shapes types...
[modules/shaper.git] / src / ModelAPI / ModelAPI_Filter.h
index a900548bfaeb768b208b3263d11940fcc635ce6c..08bb82d1e03d23082cf16950049c4cb0c2482195 100644 (file)
@@ -57,6 +57,13 @@ public:
 
   /// Returns the ordered list of attributes related to the filter.
   virtual std::list<AttributePtr> filterArgs(const std::string theFilterID) const = 0;
+
+  /// Sets the attribute (not-persistent field) that contains this filters feature.
+  /// The filter feature may make synchronization by this method call.
+  virtual void setAttribute(const AttributePtr& theAttr) = 0;
+
+  /// Returns the attribute (not-persistent field) that contains this filters feature.
+  virtual const AttributePtr& baseAttribute() const = 0;
 };
 
 typedef std::shared_ptr<ModelAPI_FiltersFeature> FiltersFeaturePtr;
@@ -93,7 +100,9 @@ public:
   /// adds an attribute of the filter
   std::shared_ptr<ModelAPI_Attribute> initAttribute(
     const std::string& theID, const std::string theAttrType) {
-    return myFeature->data()->addFloatingAttribute(theID, theAttrType, myCurrentFilter);
+    AttributePtr aR = myFeature->data()->addFloatingAttribute(theID, theAttrType, myCurrentFilter);
+    aR->setIsArgument(false); // to avoid parametric update
+    return aR;
   }
 };