]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModelAPI/ModelAPI_Feature.h
Salome HOME
Issue #273: Add copyright string
[modules/shaper.git] / src / ModelAPI / ModelAPI_Feature.h
index 431b065b77f2d76d26d696ba16bbd75b6f9191da..452686cdb20906749a9c312f2a720c0a32121adc 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:        ModelAPI_Feature.hxx
 // Created:     21 Mar 2014
 // Author:      Mikhail PONIKAROV
@@ -53,6 +55,11 @@ class ModelAPI_Feature : public ModelAPI_Object
   /// Computes or recomputes the results
   virtual void execute() = 0;
 
+  /// Registers error during the execution, causes the ExecutionFailed state
+  virtual void setError(const std::string& theError) {
+    data()->setError(theError);
+  }
+
   /// returns the current results of the feature
   MODELAPI_EXPORT const std::list<std::shared_ptr<ModelAPI_Result> >& results();
   /// returns the first result in the list or NULL reference