Salome HOME
Merge branch 'master' of ssh://git.salome-platform.org/tools/medcoupling
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingDataArrayTypemaps.i
index 675dd12c40698e8b050f644d58d8dc0c6a9c8cb8..8cb326457a0aecbfe9be8f1a0e537dd50298ecf2 100644 (file)
@@ -23,6 +23,8 @@
 
 #include "InterpKernelAutoPtr.hxx"
 
+#include <sstream>
+
 /*!
  * This method is an extention of PySlice_GetIndices but less
  * open than PySlice_GetIndicesEx that accepts too many situations.
@@ -2660,5 +2662,20 @@ static PyObject *NewMethWrapCallInitOnlyIfDictWithSingleEltInInput(PyObject *cls
   return instance;
 }
 
+static PyObject *convertPartDefinition(MEDCoupling::PartDefinition *pd, int owner) throw(INTERP_KERNEL::Exception)
+{
+  PyObject *ret=0;
+  if(!pd)
+    {
+      Py_XINCREF(Py_None);
+      return Py_None;
+    }
+  if(dynamic_cast<MEDCoupling::DataArrayPartDefinition *>(pd))
+    ret=SWIG_NewPointerObj((void*)pd,SWIGTYPE_p_MEDCoupling__DataArrayPartDefinition,owner);
+  else
+    ret=SWIG_NewPointerObj((void*)pd,SWIGTYPE_p_MEDCoupling__SlicePartDefinition,owner);
+  return ret;
+}
+
 #endif