Salome HOME
Merging with WPdev
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Swig.i
index eadd476e4a00f9e541f0bb1948d7f19e8494512c..1a7c393fa91fc7b6c2f2ca4621261ddefb878c87 100644 (file)
@@ -17,7 +17,7 @@
 //  License along with this library; if not, write to the Free Software 
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 // 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
 #include "SMESHGUI_Swig.hxx"
 %}
 
+/* Exception handler for all functions */
+%exception {
+  class PyAllowThreadsGuard {
+   public:
+    // Py_BEGIN_ALLOW_THREADS
+    PyAllowThreadsGuard() { _save = PyEval_SaveThread(); }
+    // Py_END_ALLOW_THREADS
+    ~PyAllowThreadsGuard() { PyEval_RestoreThread(_save); }
+   private:
+    PyThreadState *_save;
+  };
+
+  PyAllowThreadsGuard guard;
+
+  $action
+}
+
 %include "typemaps.i"
 
 class SMESH_Swig
@@ -57,4 +74,6 @@ class SMESH_Swig
   void SetName(const char* Entry, const char* Name);
 
   void SetMeshIcon(const char* Mesh_Entry, const bool isComputed);
+
+  void CreateAndDisplayActor( const char* Mesh_Entry );
 };