]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Correct error in wrapping
authorAnthony Geay <anthony.geay@edf.fr>
Fri, 5 May 2017 06:05:10 +0000 (08:05 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 5 May 2017 06:05:10 +0000 (08:05 +0200)
src/MEDCoupling_Swig/MEDCouplingCommon.i
src/MEDPartitioner_Swig/MEDPartitionerCommon.i

index f66c2106ca14ebc00beff87a7de24ac62adb53ac..653f5af58d5cadafd346958e46515cc05793cb59 100644 (file)
@@ -427,6 +427,9 @@ using namespace INTERP_KERNEL;
 %newobject MEDCoupling::MEDCouplingGaussLocalization::localizePtsInRefCooForEachCell;
 %newobject MEDCoupling::MEDCouplingGaussLocalization::buildRefCell;
 %newobject MEDCoupling::MEDCouplingSkyLineArray::BuildFromPolyhedronConn;
+%newobject MEDCoupling::MEDCouplingSkyLineArray::getSuperIndexArray;
+%newobject MEDCoupling::MEDCouplingSkyLineArray::getIndexArray;
+%newobject MEDCoupling::MEDCouplingSkyLineArray::getValuesArray;
 
 %feature("unref") MEDCouplingPointSet "$this->decrRef();"
 %feature("unref") MEDCouplingMesh "$this->decrRef();"
@@ -1216,10 +1219,6 @@ namespace MEDCoupling
     int getNumberOf() const;
     int getLength() const;
     
-    DataArrayInt* getSuperIndexArray() const;
-    DataArrayInt* getIndexArray() const;
-    DataArrayInt* getValuesArray() const;
-
     void deletePack(const int i, const int j) throw(INTERP_KERNEL::Exception);
     
     %extend 
@@ -1248,6 +1247,30 @@ namespace MEDCoupling
       {
         return self->simpleRepr();
       }
+      
+      DataArrayInt *getSuperIndexArray() const
+      {
+        DataArrayInt *ret(self->getSuperIndexArray());
+        if(ret)
+          ret->incrRef();
+        return ret;
+      }
+      
+      DataArrayInt *getIndexArray() const
+      {
+        DataArrayInt *ret(self->getIndexArray());
+        if(ret)
+          ret->incrRef();
+        return ret;
+      }
+      
+      DataArrayInt *getValuesArray() const
+      {
+        DataArrayInt *ret(self->getValuesArray());
+        if(ret)
+          ret->incrRef();
+        return ret;
+      }
      
       PyObject *getSimplePackSafe(int absolutePackId) const throw(INTERP_KERNEL::Exception)
       {
index 7ecf24f86e6d5f0d5908d31917a773b128f1f7d5..350ac7555c4898f2ff5e6693b41c46cdbfefba4e 100644 (file)
@@ -38,6 +38,8 @@ using namespace MEDPARTITIONER;
 
 %newobject MEDPARTITIONER::MEDPartitioner::New;
 %newobject MEDPARTITIONER::MEDPartitioner::Graph;
+%newobject MEDPARTITIONER::MEDPartitioner::Graph::getGraph;
+%newobject MEDPARTITIONER::MEDPartitioner::Graph::getPartition;
 %newobject MEDPARTITIONER::MEDPartitioner::getMEDFileData;
 %feature("unref") MEDCoupling::MEDFileData "$this->decrRef();"
 
@@ -53,8 +55,20 @@ namespace MEDPARTITIONER
     typedef enum {METIS,SCOTCH} splitter_type;
   public:
     virtual void partGraph(int ndomain, const std::string& options_string="", ParaDomainSelector *sel=0) throw(INTERP_KERNEL::Exception);
-    const MEDCoupling::MEDCouplingSkyLineArray *getGraph() const;
-    const MEDCoupling::MEDCouplingSkyLineArray *getPartition() const;
+    MEDCoupling::MEDCouplingSkyLineArray *getGraph() const
+    {
+      const MEDCoupling::MEDCouplingSkyLineArray *ret(self->getGraph());
+      if(ret)
+        ret->incrRef();
+      return const_cast<MEDCoupling::MEDCouplingSkyLineArray *>(ret);
+    }
+    const MEDCoupling::MEDCouplingSkyLineArray *getPartition() const
+    {
+      const MEDCoupling::MEDCouplingSkyLineArray *ret(self->getPartition());
+      if(ret)
+        ret->incrRef();
+      return const_cast<MEDCoupling::MEDCouplingSkyLineArray *>(ret);
+    }
     int nbVertices() const;
   };