Salome HOME
Issue #464 just clear local context of the interpreter, not initialize it from scratch
[modules/shaper.git] / src / ParametersPlugin / ParametersPlugin_PyInterp.h
1 /*
2  * ParametersPlugin_PyInterp.h
3  *
4  *  Created on: Apr 2, 2015
5  *      Author: sbh
6  */
7
8 #ifndef PARAMETERSPLUGIN_PYINTERP_H_
9 #define PARAMETERSPLUGIN_PYINTERP_H_
10
11 #include <PyInterp_Interp.h>
12 #include <ParametersPlugin.h>
13
14 #include <list>
15 #include <string>
16
17 class PARAMETERSPLUGIN_EXPORT ParametersPlugin_PyInterp : public PyInterp_Interp
18 {
19  public:
20   ParametersPlugin_PyInterp();
21   virtual ~ParametersPlugin_PyInterp();
22
23   std::list<std::string> compile(const std::string&);
24   void extendLocalContext(const std::list<std::string>&);
25   void clearLocalContext();
26   double evaluate(const std::string&, std::string&);
27
28  protected:
29   std::string errorMessage();
30   // Overrides PyInterp_Interp
31   virtual bool initContext();
32 };
33
34 #endif /* PARAMETERSPLUGIN_PYINTERP_H_ */