Salome HOME
updated copyright message
[modules/shaper.git] / src / InitializationPlugin / InitializationPlugin_PyInterp.h
index 3f765861bd2dc6c9982204cc293922d1394b939d..a2934ae72bf5fb28b31a4d899b6852fefd679f12 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #ifndef INITIALIZATIONPLUGIN_PYINTERP_H_
@@ -40,16 +39,19 @@ class INITIALIZATIONPLUGIN_EXPORT InitializationPlugin_PyInterp : public PyInter
   virtual ~InitializationPlugin_PyInterp();
 
   /// Returns a list of positions for theName in theExpression.
-  std::list<std::pair<int, int> > positions(const std::string& theExpression,
-                                            const std::string& theName);
+  std::list<std::pair<int, int> > positions(const std::wstring& theExpression,
+                                            const std::wstring& theName);
   /// Compiles theExpression and returns a list of parameters used in theExpression.
-  std::list<std::string> compile(const std::string& theExpression);
+  std::list<std::wstring> compile(const std::wstring& theExpression);
   /// Extends local context with the list of parameters.
-  void extendLocalContext(const std::list<std::string>& theParameters);
+  void extendLocalContext(const std::list<std::wstring>& theParameters);
   /// Clears local context.
   void clearLocalContext();
   /// Evaluates theExpression and returns its value.
-  double evaluate(const std::string& theExpression, std::string& theError);
+  double evaluate(const std::wstring& theExpression, std::string& theError);
+
+  /// Runs the string command in the python interpreter. Returns true if no error is in result.
+  bool runString(std::string theString);
 
  protected:
   /// Returns error message.