Salome HOME
Allow usage of BatchManager_eClient methods in Python
[tools/libbatch.git] / src / Python / libBatch_Swig_typemap.i
index 543cb7abaa5502068b45f5fbad451796e7517fdb..e0958b2284195184ca713ce2be1110d4702edb8a 100644 (file)
@@ -210,3 +210,11 @@ typedef int Py_ssize_t;
   $1 = E;
 }
 
+// Dynamic cast to FactBatchManager_eClient if necessary
+%typemap(out) Batch::FactBatchManager *
+{
+  if(dynamic_cast<Batch::FactBatchManager_eClient *>($1))
+    $result=SWIG_NewPointerObj((void*)$1,$descriptor(Batch::FactBatchManager_eClient *),$owner);
+  else
+    $result=SWIG_NewPointerObj((void*)$1,$descriptor(Batch::FactBatchManager *),$owner);
+}