virtual bool compute(const std::string& theAttributeId) { return false; };
/// Registers error during the execution, causes the ExecutionFailed state
- virtual void setError(const std::string& theError) {
- data()->setError(theError);
+ virtual void setError(const std::string& theError, bool isSend = true) {
+ data()->setError(theError, isSend);
+ }
+
+ /// Returns error, arose during the execution
+ virtual std::string error() const {
+ return data()->error();
}
/// returns the current results of the feature
const int theIndex);
/// 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);
/// removes all results from the feature
MODELAPI_EXPORT void eraseResults();
/// removes all fields from this feature: results, data, etc