Salome HOME
Eliminate some Visual Studio warnings
[modules/shaper.git] / src / ParametersPlugin / ParametersPlugin_EvalListener.h
index 057ca792424355e710e765328693f4efa8a324f5..02b5e6c523d4d717def9b701ad1d800b9b6aa088 100644 (file)
 
 #include <ParametersPlugin.h>
 #include <Events_Loop.h>
-#include <ParametersPlugin_PyInterp.h>
 
-class PARAMETERSPLUGIN_EXPORT ParametersPlugin_EvalListener : public Events_Listener
+class ModelAPI_Attribute;
+class ModelAPI_Document;
+class ParametersPlugin_Parameter;
+class ParametersPlugin_PyInterp;
+
+class ParametersPlugin_EvalListener : public Events_Listener
 {
  public:
-  ParametersPlugin_EvalListener();
-  virtual ~ParametersPlugin_EvalListener();
+  PARAMETERSPLUGIN_EXPORT ParametersPlugin_EvalListener();
+  PARAMETERSPLUGIN_EXPORT virtual ~ParametersPlugin_EvalListener();
 
-  virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+  PARAMETERSPLUGIN_EXPORT virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
 
  protected:
-  double evaluate(const std::string& theExpression,
-                  std::string& theError) ;
+  double evaluate(const std::string& theExpression, std::string& theError, 
+                  const std::shared_ptr<ModelAPI_Document>& theDocument);
+
+  void processEvaluationEvent(const std::shared_ptr<Events_Message>& theMessage);
+  void processObjectRenamedEvent(const std::shared_ptr<Events_Message>& theMessage);
+
+  std::string renameInPythonExpression(const std::string& theExpression,
+                                       const std::string& theOldName,
+                                       const std::string& theNewName);
+  void renameInParameter(std::shared_ptr<ParametersPlugin_Parameter> theParameter,
+                         const std::string& theOldName,
+                         const std::string& theNewName);
+  void renameInAttribute(std::shared_ptr<ModelAPI_Attribute> theAttribute,
+                         const std::string& theOldName,
+                         const std::string& theNewName);
 
  private:
   std::shared_ptr<ParametersPlugin_PyInterp> myInterp;