Salome HOME
Tests: minor fixes:
[tools/medcoupling.git] / src / MEDLoader / Swig / MEDLoaderCommon.i
index a9d85eeb0d6456d3623865caa9153e01f625da18..08396b5bf3fa6574abffbeb0af4de38658a16a02 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  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
@@ -156,6 +156,7 @@ using namespace MEDCoupling;
 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::getTimeStepGivenTime;
 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::__iter__;
 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::extractPart;
+%newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::buildNewEmpty;
 %newobject MEDCoupling::MEDFileFieldMultiTS::New;
 %newobject MEDCoupling::MEDFileFieldMultiTS::LoadSpecificEntities;
 %newobject MEDCoupling::MEDFileFieldMultiTS::getFieldAtLevel;
@@ -172,6 +173,7 @@ using namespace MEDCoupling;
 %newobject MEDCoupling::MEDFileAnyTypeField1TS::New;
 %newobject MEDCoupling::MEDFileAnyTypeField1TS::shallowCpy;
 %newobject MEDCoupling::MEDFileAnyTypeField1TS::deepCopy;
+%newobject MEDCoupling::MEDFileAnyTypeField1TS::extractPart;
 %newobject MEDCoupling::MEDFileField1TS::New;
 %newobject MEDCoupling::MEDFileField1TS::getFieldAtLevel;
 %newobject MEDCoupling::MEDFileField1TS::getFieldAtTopLevel;
@@ -179,7 +181,6 @@ using namespace MEDCoupling;
 %newobject MEDCoupling::MEDFileField1TS::getFieldAtLevelOld;
 %newobject MEDCoupling::MEDFileField1TS::getUndergroundDataArray;
 %newobject MEDCoupling::MEDFileField1TS::convertToInt;
-%newobject MEDCoupling::MEDFileField1TS::extractPart;
 
 %newobject MEDCoupling::MEDFileIntField1TS::New;
 %newobject MEDCoupling::MEDFileIntField1TS::getUndergroundDataArray;
@@ -1972,6 +1973,13 @@ namespace MEDCoupling
           PyList_SetItem(retPy,i,convertMEDFileField1TS(ret[i].retn(), SWIG_POINTER_OWN | 0 ));
         return retPy;
       }
+
+      MEDFileAnyTypeField1TS *extractPart(PyObject *extractDef, MEDFileMesh *mm) const throw(INTERP_KERNEL::Exception)
+      {
+        std::map<int, MCAuto<DataArrayInt> > extractDefCpp;
+        convertToMapIntDataArrayInt(extractDef,extractDefCpp);
+        return self->extractPart(extractDefCpp,mm);
+      }
     }
   };
 
@@ -2106,13 +2114,6 @@ namespace MEDCoupling
            PyTuple_SetItem(ret,1,elt);
            return ret;
          }
-
-         MEDFileField1TS *extractPart(PyObject *extractDef, MEDFileMesh *mm) const
-         {
-           std::map<int, MCAuto<DataArrayInt> > extractDefCpp;
-           convertToMapIntDataArrayInt(extractDef,extractDefCpp);
-           return self->extractPart(extractDefCpp,mm);
-         }
        }
   };
 
@@ -2274,6 +2275,7 @@ namespace MEDCoupling
     MEDFileAnyTypeField1TS *getTimeStepGivenTime(double time, double eps=1e-8) const throw(INTERP_KERNEL::Exception);
     void pushBackTimeStep(MEDFileAnyTypeField1TS *f1ts) throw(INTERP_KERNEL::Exception);
     void synchronizeNameScope() throw(INTERP_KERNEL::Exception);
+    MEDFileAnyTypeFieldMultiTS *buildNewEmpty() const throw(INTERP_KERNEL::Exception);
     %extend
     {
       int __len__() const throw(INTERP_KERNEL::Exception)
@@ -2559,7 +2561,7 @@ namespace MEDCoupling
           }
       }
 
-      MEDFileAnyTypeFieldMultiTS *extractPart(PyObject *extractDef, MEDFileMesh *mm) const
+      MEDFileAnyTypeFieldMultiTS *extractPart(PyObject *extractDef, MEDFileMesh *mm) const throw(INTERP_KERNEL::Exception)
       {
         std::map<int, MCAuto<DataArrayInt> > extractDefCpp;
         convertToMapIntDataArrayInt(extractDef,extractDefCpp);