X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_Feature.h;h=b80583544021bd7afc1f74b9129df94f246166f5;hb=a11ca8e50848c291ed13f920168622937ae3b8dc;hp=c338e151fd76fe95ed6e1a83a61692fe65ae8987;hpb=ca1d32b5d900a39c50749271b5dec53ed59c82af;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_Feature.h b/src/ModelAPI/ModelAPI_Feature.h index c338e151f..b80583544 100644 --- a/src/ModelAPI/ModelAPI_Feature.h +++ b/src/ModelAPI/ModelAPI_Feature.h @@ -58,8 +58,13 @@ class ModelAPI_Feature : public ModelAPI_Object 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 @@ -75,6 +80,8 @@ class ModelAPI_Feature : public ModelAPI_Object const int theIndex); /// removes the result from the feature MODELAPI_EXPORT void removeResult(const std::shared_ptr& 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