Salome HOME
Merge remote branch 'origin/V7_4_BR'
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingRefCountObject.i
index 0db2e7e7ee9b41bf939ff930d498552398d66d92..e6ca9aae256c38bf946b63665c11a42cd2cc489b 100644 (file)
@@ -68,6 +68,7 @@ namespace ParaMEDMEM
   public:
     std::size_t getHeapMemorySize() const throw(INTERP_KERNEL::Exception);
     std::string getHeapMemorySizeStr() const throw(INTERP_KERNEL::Exception);
+    bool isObjectInTheProgeny(const BigMemoryObject *obj) const throw(INTERP_KERNEL::Exception);
     virtual std::size_t getHeapMemorySizeWithoutChildren() const throw(INTERP_KERNEL::Exception);
     virtual ~BigMemoryObject();
     %extend
@@ -81,6 +82,15 @@ namespace ParaMEDMEM
         return ret;
       }
 
+      PyObject *getAllTheProgeny() const throw(INTERP_KERNEL::Exception)
+      {
+        std::vector<const BigMemoryObject *> c(self->getAllTheProgeny());
+        PyObject *ret(PyList_New(c.size()));
+        for(std::size_t i=0;i<c.size();i++)
+          PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(c[i]),SWIGTYPE_p_ParaMEDMEM__BigMemoryObject, 0 | 0 ));
+        return ret;
+      }
+
       static std::size_t GetHeapMemorySizeOfObjs(PyObject *objs) throw(INTERP_KERNEL::Exception)
       {
         std::vector<const BigMemoryObject *> cppObjs;