Salome HOME
Fix of 0022449 ([CEA 1033] SegFault when running $MED_ROOT_DIR/bin/salome/TestMEDCoup...
[modules/med.git] / src / MEDCouplingCorba_Swig / MEDCouplingCorba.i
index 0a5e5e0dc55bacb98f2d4d9fb41d0057efc77645..810035328aac0de5fa4588dc509c1831e95758db 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -16,6 +16,7 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Author : Anthony Geay (CEA/DEN)
 
 %module MEDCouplingCorba
 
 #include "MEDCouplingMultiFieldsServant.hxx"
 #include "MEDCouplingFieldOverTimeServant.hxx"
 #include "MEDCouplingUMeshServant.hxx"
+#include "MEDCoupling1SGTUMeshServant.hxx"
+#include "MEDCoupling1DGTUMeshServant.hxx"
 #include "MEDCouplingExtrudedMeshServant.hxx"
 #include "MEDCouplingCMeshServant.hxx"
+#include "MEDCouplingCurveLinearMeshServant.hxx"
 #include "DataArrayDoubleServant.hxx"
 #include "DataArrayIntServant.hxx"
 #include "MEDCouplingCorbaTypemaps.i"
@@ -43,10 +47,15 @@ namespace ParaMEDMEM
   public:
     %extend
        {
-         static PyObject *_this(const MEDCouplingFieldDouble *cppPointerOfMesh)
+         static PyObject *_this(const MEDCouplingFieldDouble *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
          {
            return buildServantAndActivate<MEDCouplingFieldDoubleServant>(cppPointerOfMesh);
          }
+         
+         static PyObject *_this2(const MEDCouplingFieldDouble *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate2<MEDCouplingFieldDoubleServant>(cppPointerOfMesh);
+         }
        }
   };
 
@@ -55,10 +64,15 @@ namespace ParaMEDMEM
   public:
     %extend
        {
-         static PyObject *_this(const MEDCouplingFieldTemplate *cppPointerOfMesh)
+         static PyObject *_this(const MEDCouplingFieldTemplate *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
          {
            return buildServantAndActivate<MEDCouplingFieldTemplateServant>(cppPointerOfMesh);
          }
+         
+         static PyObject *_this2(const MEDCouplingFieldTemplate *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate2<MEDCouplingFieldTemplateServant>(cppPointerOfMesh);
+         }
        }
   };
 
@@ -67,10 +81,15 @@ namespace ParaMEDMEM
   public:
     %extend
        {
-         static PyObject *_this(const MEDCouplingMultiFields *cppPointerOfMesh)
+         static PyObject *_this(const MEDCouplingMultiFields *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
          {
            return buildServantAndActivate<MEDCouplingMultiFieldsServant>(cppPointerOfMesh);
          }
+
+         static PyObject *_this2(const MEDCouplingMultiFields *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate2<MEDCouplingMultiFieldsServant>(cppPointerOfMesh);
+         }
        }
   };
 
@@ -79,10 +98,60 @@ namespace ParaMEDMEM
   public:
     %extend
        {
-         static PyObject *_this(const MEDCouplingFieldOverTime *cppPointerOfMesh)
+         static PyObject *_this(const MEDCouplingFieldOverTime *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
          {
            return buildServantAndActivate<MEDCouplingFieldOverTimeServant>(cppPointerOfMesh);
          }
+
+         static PyObject *_this2(const MEDCouplingFieldOverTime *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate2<MEDCouplingFieldOverTimeServant>(cppPointerOfMesh);
+         }
+       }
+  };
+
+  class MEDCouplingMeshServant
+  {
+  public:
+    %extend
+       {
+         static PyObject *_this(const MEDCouplingMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           if(!cppPointerOfMesh)
+             throw INTERP_KERNEL::Exception("MEDCouplingMeshServant::_this : input pointer is NULL !");
+           if(dynamic_cast<const MEDCouplingUMesh *>(cppPointerOfMesh))
+             return buildServantAndActivate<MEDCouplingUMeshServant>(dynamic_cast<const MEDCouplingUMesh *>(cppPointerOfMesh));
+           if(dynamic_cast<const MEDCoupling1SGTUMesh *>(cppPointerOfMesh))
+             return buildServantAndActivate<MEDCoupling1SGTUMeshServant>(dynamic_cast<const MEDCoupling1SGTUMesh *>(cppPointerOfMesh));
+           if(dynamic_cast<const MEDCoupling1DGTUMesh *>(cppPointerOfMesh))
+             return buildServantAndActivate<MEDCoupling1DGTUMeshServant>(dynamic_cast<const MEDCoupling1DGTUMesh *>(cppPointerOfMesh));
+           if(dynamic_cast<const MEDCouplingExtrudedMesh *>(cppPointerOfMesh))
+             return buildServantAndActivate<MEDCouplingExtrudedMeshServant>(dynamic_cast<const MEDCouplingExtrudedMesh *>(cppPointerOfMesh));
+           if(dynamic_cast<const MEDCouplingCMesh *>(cppPointerOfMesh))
+             return buildServantAndActivate<MEDCouplingCMeshServant>(dynamic_cast<const MEDCouplingCMesh *>(cppPointerOfMesh));
+           if(dynamic_cast<const MEDCouplingCurveLinearMesh *>(cppPointerOfMesh))
+             return buildServantAndActivate<MEDCouplingCurveLinearMeshServant>(dynamic_cast<const MEDCouplingCurveLinearMesh *>(cppPointerOfMesh));
+           throw INTERP_KERNEL::Exception("MEDCouplingMeshServant::_this : unrecognized type (or not managed type) of Mesh in input !");
+         }
+
+         static PyObject *_this2(const MEDCouplingMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           if(!cppPointerOfMesh)
+             throw INTERP_KERNEL::Exception("MEDCouplingMeshServant::_this2 : input pointer is NULL !");
+           if(dynamic_cast<const MEDCouplingUMesh *>(cppPointerOfMesh))
+             return buildServantAndActivate2<MEDCouplingUMeshServant>(dynamic_cast<const MEDCouplingUMesh *>(cppPointerOfMesh));
+           if(dynamic_cast<const MEDCoupling1SGTUMesh *>(cppPointerOfMesh))
+             return buildServantAndActivate2<MEDCoupling1SGTUMeshServant>(dynamic_cast<const MEDCoupling1SGTUMesh *>(cppPointerOfMesh));
+           if(dynamic_cast<const MEDCoupling1DGTUMesh *>(cppPointerOfMesh))
+             return buildServantAndActivate2<MEDCoupling1DGTUMeshServant>(dynamic_cast<const MEDCoupling1DGTUMesh *>(cppPointerOfMesh));
+           if(dynamic_cast<const MEDCouplingExtrudedMesh *>(cppPointerOfMesh))
+             return buildServantAndActivate2<MEDCouplingExtrudedMeshServant>(dynamic_cast<const MEDCouplingExtrudedMesh *>(cppPointerOfMesh));
+           if(dynamic_cast<const MEDCouplingCMesh *>(cppPointerOfMesh))
+             return buildServantAndActivate2<MEDCouplingCMeshServant>(dynamic_cast<const MEDCouplingCMesh *>(cppPointerOfMesh));
+           if(dynamic_cast<const MEDCouplingCurveLinearMesh *>(cppPointerOfMesh))
+             return buildServantAndActivate2<MEDCouplingCurveLinearMeshServant>(dynamic_cast<const MEDCouplingCurveLinearMesh *>(cppPointerOfMesh));
+           throw INTERP_KERNEL::Exception("MEDCouplingMeshServant::_this2 : unrecognized type (or not managed type) of Mesh in input !");
+         }
        }
   };
 
@@ -91,10 +160,49 @@ namespace ParaMEDMEM
   public:
     %extend
        {
-         static PyObject *_this(const MEDCouplingUMesh *cppPointerOfMesh)
+         static PyObject *_this(const MEDCouplingUMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
          {
            return buildServantAndActivate<MEDCouplingUMeshServant>(cppPointerOfMesh);
          }
+
+         static PyObject *_this2(const MEDCouplingUMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate2<MEDCouplingUMeshServant>(cppPointerOfMesh);
+         }
+       }
+  };
+
+  class MEDCoupling1SGTUMeshServant
+  {
+  public:
+    %extend
+       {
+         static PyObject *_this(const MEDCoupling1SGTUMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate<MEDCoupling1SGTUMeshServant>(cppPointerOfMesh);
+         }
+
+         static PyObject *_this2(const MEDCoupling1SGTUMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate2<MEDCoupling1SGTUMeshServant>(cppPointerOfMesh);
+         }
+       }
+  };
+
+  class MEDCoupling1DGTUMeshServant
+  {
+  public:
+    %extend
+       {
+         static PyObject *_this(const MEDCoupling1DGTUMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate<MEDCoupling1DGTUMeshServant>(cppPointerOfMesh);
+         }
+
+         static PyObject *_this2(const MEDCoupling1DGTUMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate2<MEDCoupling1DGTUMeshServant>(cppPointerOfMesh);
+         }
        }
   };
 
@@ -103,10 +211,15 @@ namespace ParaMEDMEM
   public:
     %extend
        {
-         static PyObject *_this(const MEDCouplingExtrudedMesh *cppPointerOfMesh)
+         static PyObject *_this(const MEDCouplingExtrudedMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
          {
            return buildServantAndActivate<MEDCouplingExtrudedMeshServant>(cppPointerOfMesh);
          }
+
+         static PyObject *_this2(const MEDCouplingExtrudedMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate2<MEDCouplingExtrudedMeshServant>(cppPointerOfMesh);
+         }
        }
   };
 
@@ -115,10 +228,32 @@ namespace ParaMEDMEM
   public:
     %extend
        {
-         static PyObject *_this(const MEDCouplingCMesh *cppPointerOfMesh)
+         static PyObject *_this(const MEDCouplingCMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
          {
            return buildServantAndActivate<MEDCouplingCMeshServant>(cppPointerOfMesh);
          }
+         
+         static PyObject *_this2(const MEDCouplingCMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate2<MEDCouplingCMeshServant>(cppPointerOfMesh);
+         }
+       }
+  };
+
+  class MEDCouplingCurveLinearMeshServant
+  {
+  public:
+    %extend
+       {
+         static PyObject *_this(const MEDCouplingCurveLinearMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate<MEDCouplingCurveLinearMeshServant>(cppPointerOfMesh);
+         }
+
+         static PyObject *_this2(const MEDCouplingCurveLinearMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate2<MEDCouplingCurveLinearMeshServant>(cppPointerOfMesh);
+         }
        }
   };
 
@@ -127,10 +262,15 @@ namespace ParaMEDMEM
   public:
     %extend
        {
-         static PyObject *_this(const DataArrayDouble *cppPointerOfMesh)
+         static PyObject *_this(const DataArrayDouble *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
          {
            return buildServantAndActivate<DataArrayDoubleServant>(cppPointerOfMesh);
          }
+
+         static PyObject *_this2(const DataArrayDouble *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate2<DataArrayDoubleServant>(cppPointerOfMesh);
+         }
        }
   };
 
@@ -139,10 +279,15 @@ namespace ParaMEDMEM
   public:
     %extend
        {
-         static PyObject *_this(const DataArrayInt *cppPointerOfMesh)
+         static PyObject *_this(const DataArrayInt *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
          {
            return buildServantAndActivate<DataArrayIntServant>(cppPointerOfMesh);
          }
+
+         static PyObject *_this2(const DataArrayInt *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+         {
+           return buildServantAndActivate2<DataArrayIntServant>(cppPointerOfMesh);
+         }
        }
   };
 }
@@ -160,6 +305,9 @@ def ParaMEDMEMDataArrayDoubleImul(self,*args):
 def ParaMEDMEMDataArrayDoubleIdiv(self,*args):
     import _MEDCouplingCorba
     return _MEDCouplingCorba.DataArrayDouble____idiv___(self, self, *args)
+def ParaMEDMEMDataArrayDoubleIpow(self,*args):
+    import _MEDCouplingCorba
+    return _MEDCouplingCorba.DataArrayDouble____ipow___(self, self, *args)
 def ParaMEDMEMMEDCouplingFieldDoubleIadd(self,*args):
     import _MEDCouplingCorba
     return _MEDCouplingCorba.MEDCouplingFieldDouble____iadd___(self, self, *args)
@@ -172,6 +320,9 @@ def ParaMEDMEMMEDCouplingFieldDoubleImul(self,*args):
 def ParaMEDMEMMEDCouplingFieldDoubleIdiv(self,*args):
     import _MEDCouplingCorba
     return _MEDCouplingCorba.MEDCouplingFieldDouble____idiv___(self, self, *args)
+def ParaMEDMEMMEDCouplingFieldDoubleIpow(self,*args):
+    import _MEDCouplingCorba
+    return _MEDCouplingCorba.MEDCouplingFieldDouble____ipow___(self, self, *args)
 def ParaMEDMEMDataArrayIntIadd(self,*args):
     import _MEDCouplingCorba
     return _MEDCouplingCorba.DataArrayInt____iadd___(self, self, *args)
@@ -187,6 +338,36 @@ def ParaMEDMEMDataArrayIntIdiv(self,*args):
 def ParaMEDMEMDataArrayIntImod(self,*args):
     import _MEDCouplingCorba
     return _MEDCouplingCorba.DataArrayInt____imod___(self, self, *args)
+def ParaMEDMEMDataArrayIntIpow(self,*args):
+    import _MEDCouplingCorba
+    return _MEDCouplingCorba.DataArrayInt____ipow___(self, self, *args)
+def ParaMEDMEMDataArrayDoubleTupleIadd(self,*args):
+    import _MEDCouplingCorba
+    return _MEDCouplingCorba.DataArrayDoubleTuple____iadd___(self, self, *args)
+def ParaMEDMEMDataArrayDoubleTupleIsub(self,*args):
+    import _MEDCouplingCorba
+    return _MEDCouplingCorba.DataArrayDoubleTuple____isub___(self, self, *args)
+def ParaMEDMEMDataArrayDoubleTupleImul(self,*args):
+    import _MEDCouplingCorba
+    return _MEDCouplingCorba.DataArrayDoubleTuple____imul___(self, self, *args)
+def ParaMEDMEMDataArrayDoubleTupleIdiv(self,*args):
+    import _MEDCouplingCorba
+    return _MEDCouplingCorba.DataArrayDoubleTuple____idiv___(self, self, *args)
+def ParaMEDMEMDataArrayIntTupleIadd(self,*args):
+    import _MEDCouplingCorba
+    return _MEDCouplingCorba.DataArrayIntTuple____iadd___(self, self, *args)
+def ParaMEDMEMDataArrayIntTupleIsub(self,*args):
+    import _MEDCouplingCorba
+    return _MEDCouplingCorba.DataArrayIntTuple____isub___(self, self, *args)
+def ParaMEDMEMDataArrayIntTupleImul(self,*args):
+    import _MEDCouplingCorba
+    return _MEDCouplingCorba.DataArrayIntTuple____imul___(self, self, *args)
+def ParaMEDMEMDataArrayIntTupleIdiv(self,*args):
+    import _MEDCouplingCorba
+    return _MEDCouplingCorba.DataArrayIntTuple____idiv___(self, self, *args)
+def ParaMEDMEMDataArrayIntTupleImod(self,*args):
+    import _MEDCouplingCorba
+    return _MEDCouplingCorba.DataArrayIntTuple____imod___(self, self, *args)
 %}
 
 %include "MEDCouplingFinalize.i"