Salome HOME
EvalListener to evaluate expression from inputs
[modules/shaper.git] / src / ParametersPlugin / ParametersPlugin_EvalListener.h
1 /*
2  * ParametersPlugin_EvalListener.h
3  *
4  *  Created on: Apr 28, 2015
5  *      Author: sbh
6  */
7
8 #ifndef SRC_PARAMETERSPLUGIN_EVALLISTENER_H_
9 #define SRC_PARAMETERSPLUGIN_EVALLISTENER_H_
10
11 #include <ParametersPlugin.h>
12 #include <Events_Loop.h>
13 #include <ParametersPlugin_PyInterp.h>
14
15 class PARAMETERSPLUGIN_EXPORT ParametersPlugin_EvalListener : public Events_Listener
16 {
17  public:
18   ParametersPlugin_EvalListener();
19   virtual ~ParametersPlugin_EvalListener();
20
21   virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
22
23  protected:
24   double evaluate(const std::string& theExpression,
25                   std::string& theError) ;
26
27  private:
28   std::shared_ptr<ParametersPlugin_PyInterp> myInterp;
29 };
30
31 #endif /* SRC_PARAMETERSPLUGIN_PARAMETERSPLUGIN_EVALLISTENER_H_ */