]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModelAPI/ModelAPI_Expression.h
Salome HOME
Issue #2024: Redesign of circle and arc of circle
[modules/shaper.git] / src / ModelAPI / ModelAPI_Expression.h
index dbfdeba6955b4ff5350a35ac2c88329862c4ba9a..769a4eebc42d275890a94813ba09f5418e02a7ee 100644 (file)
@@ -48,16 +48,24 @@ class ModelAPI_Expression
   MODELAPI_EXPORT virtual std::string error() = 0;
 
   /// Defines the used parameters (by the parameters listener)
-  MODELAPI_EXPORT virtual void setUsedParameters(const std::set<std::string>& theUsedParameters) = 0;
+  MODELAPI_EXPORT virtual
+    void setUsedParameters(const std::set<std::string>& theUsedParameters) = 0;
 
   /// Returns the used parameters
   MODELAPI_EXPORT virtual std::set<std::string> usedParameters() const = 0;
 
+  /// Returns True if the given string can be defined as a name of an expression variable
+  MODELAPI_EXPORT static bool isVariable(const std::string& theString);
+
  protected:
   /// Objects are created for features automatically
   MODELAPI_EXPORT ModelAPI_Expression();
   /// Reinitializes the internal state of the attribute (may be needed on undo/redo, abort, etc)
   MODELAPI_EXPORT virtual void reinit() = 0;
+  /// Resets attribute to deafult state.
+  MODELAPI_EXPORT virtual void reset() {
+    myIsInitialized = false;
+  };
 
   bool myIsInitialized; ///< is some value assigned to this attribute