- MODELAPI_EXPORT virtual void initAttributes() = 0;
-
- /// Computes or recomputes the result
- MODELAPI_EXPORT virtual void execute() = 0;
-
- /// Returns true if this feature must be displayed in the history (top level of Part tree)
- MODELAPI_EXPORT virtual bool isInHistory() {return true;}
+ virtual void initAttributes() = 0;
+
+ /// Computes or recomputes the results
+ virtual void execute() = 0;
+
+ /// returns the current results of the feature
+ MODELAPI_EXPORT const std::list<boost::shared_ptr<ModelAPI_Result> >& results();
+ /// returns the first result in the list or NULL reference
+ MODELAPI_EXPORT boost::shared_ptr<ModelAPI_Result> firstResult();
+ /// sets the alone result
+ MODELAPI_EXPORT void setResult(const boost::shared_ptr<ModelAPI_Result>& theResult);
+ /// sets the result by index (zero based), results before this must be set before
+ MODELAPI_EXPORT void setResult(const boost::shared_ptr<ModelAPI_Result>& theResult,
+ const int theIndex);
+ /// removes the result from the feature
+ MODELAPI_EXPORT void removeResult(const boost::shared_ptr<ModelAPI_Result>& theResult);
+ /// removes all results from the feature
+ MODELAPI_EXPORT void eraseResults();
+ /// removes all fields from this feature: results, data, etc
+ MODELAPI_EXPORT virtual void erase();
+
+ /// Returns true if result is persistent (stored in document) and on undo-redo, save-open
+ /// it is not needed to recompute it.
+ virtual bool isPersistentResult() {return true;}