Salome HOME
Fix for the issue #593: do not remove naming attribute, but use TNaming_Builder for...
[modules/shaper.git] / src / ModelAPI / ModelAPI_Feature.h
index c2f34865b18080e5fa17ad824a0895396294e4ee..8631c3e08b2d53beb32c0ad5fb951e2e5064337a 100644 (file)
@@ -83,11 +83,16 @@ class ModelAPI_Feature : public ModelAPI_Object
   /// removes the result from the feature
   MODELAPI_EXPORT void removeResult(const std::shared_ptr<ModelAPI_Result>& theResult);
   /// removes all results starting from the gived index (zero-based)
-  MODELAPI_EXPORT void removeResults(const int theSinceIndex);
+  /// \param theSinceIndex - index of the deleted result and all after also will be deleted
+  /// \param theFlush - if it is false, REDISPLAY message is not flushed
+  MODELAPI_EXPORT void removeResults(const int theSinceIndex, const bool theFlush = true);
   /// removes all results from the feature
   MODELAPI_EXPORT void eraseResults();
   /// removes all fields from this feature: results, data, etc
   MODELAPI_EXPORT virtual void erase();
+  /// removes the result from the list of feature (not doing in disabled): normally this
+  /// method is not used from features. only internally
+  MODELAPI_EXPORT void eraseResultFromList(const std::shared_ptr<ModelAPI_Result>& theResult);
 
   /// Returns true if result is persistent (stored in document) and on undo-redo, save-open
   /// it is not needed to recompute it.
@@ -104,6 +109,11 @@ class ModelAPI_Feature : public ModelAPI_Object
   /// \returns false by default
   MODELAPI_EXPORT virtual bool isMacro() const;
 
+  /// Returns true if preview update during the edition needed. Otherwise the update-mechanism
+  /// calls the \a execute function only on "apply" of the operation
+  /// \returns true by default
+  MODELAPI_EXPORT virtual bool isPreviewNeeded() const;
+
   /// Must return document where the new feature must be added to
   /// By default it is empty: it is added to the document this method is called to
   MODELAPI_EXPORT virtual const std::string& documentToAdd();