Salome HOME
getHeapMemorySize rearch
authorageay <ageay>
Thu, 22 Aug 2013 08:29:36 +0000 (08:29 +0000)
committerageay <ageay>
Thu, 22 Aug 2013 08:29:36 +0000 (08:29 +0000)
52 files changed:
src/MEDCalculator/MEDCalculatorDBField.cxx
src/MEDCalculator/MEDCalculatorDBField.hxx
src/MEDCalculator/MEDCalculatorDBSliceField.cxx
src/MEDCalculator/MEDCalculatorDBSliceField.hxx
src/MEDCoupling/MEDCoupling1GTUMesh.cxx
src/MEDCoupling/MEDCoupling1GTUMesh.hxx
src/MEDCoupling/MEDCouplingCMesh.cxx
src/MEDCoupling/MEDCouplingCMesh.hxx
src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx
src/MEDCoupling/MEDCouplingCurveLinearMesh.hxx
src/MEDCoupling/MEDCouplingDefinitionTime.cxx
src/MEDCoupling/MEDCouplingDefinitionTime.hxx
src/MEDCoupling/MEDCouplingExtrudedMesh.cxx
src/MEDCoupling/MEDCouplingExtrudedMesh.hxx
src/MEDCoupling/MEDCouplingField.cxx
src/MEDCoupling/MEDCouplingField.hxx
src/MEDCoupling/MEDCouplingFieldDiscretization.cxx
src/MEDCoupling/MEDCouplingFieldDiscretization.hxx
src/MEDCoupling/MEDCouplingFieldDouble.cxx
src/MEDCoupling/MEDCouplingFieldDouble.hxx
src/MEDCoupling/MEDCouplingMemArray.cxx
src/MEDCoupling/MEDCouplingMemArray.hxx
src/MEDCoupling/MEDCouplingMultiFields.cxx
src/MEDCoupling/MEDCouplingMultiFields.hxx
src/MEDCoupling/MEDCouplingPointSet.cxx
src/MEDCoupling/MEDCouplingPointSet.hxx
src/MEDCoupling/MEDCouplingRefCountObject.cxx
src/MEDCoupling/MEDCouplingRefCountObject.hxx
src/MEDCoupling/MEDCouplingTimeDiscretization.cxx
src/MEDCoupling/MEDCouplingTimeDiscretization.hxx
src/MEDCoupling/MEDCouplingUMesh.cxx
src/MEDCoupling/MEDCouplingUMesh.hxx
src/MEDCoupling_Swig/MEDCouplingCommon.i
src/MEDLoader/MEDFileData.cxx
src/MEDLoader/MEDFileData.hxx
src/MEDLoader/MEDFileField.cxx
src/MEDLoader/MEDFileField.hxx
src/MEDLoader/MEDFileFieldOverView.cxx
src/MEDLoader/MEDFileFieldOverView.hxx
src/MEDLoader/MEDFileMesh.cxx
src/MEDLoader/MEDFileMesh.hxx
src/MEDLoader/MEDFileMeshElt.cxx
src/MEDLoader/MEDFileMeshElt.hxx
src/MEDLoader/MEDFileMeshLL.cxx
src/MEDLoader/MEDFileMeshLL.hxx
src/MEDLoader/MEDFileParameter.cxx
src/MEDLoader/MEDFileParameter.hxx
src/MEDLoader/SauvReader.cxx
src/MEDLoader/SauvReader.hxx
src/MEDLoader/SauvUtilities.hxx
src/MEDLoader/SauvWriter.cxx
src/MEDLoader/SauvWriter.hxx

index 78110d2cc6ae4b9625a0c40a11df47a92637f54f..d9d3a8ed369abf1b1682cebb9ce090ffbd0b9337 100644 (file)
@@ -51,9 +51,9 @@ std::size_t MEDCalculatorDBField::getHeapMemorySizeWithoutChildren() const
   return 0;
 }
 
-std::vector<RefCountObject *> MEDCalculatorDBField::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCalculatorDBField::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 MEDCalculatorDBField *MEDCalculatorDBField::operator+(double val) const throw(INTERP_KERNEL::Exception)
index 6809b9659491682cb7dbecd133499f958f2d265a..1d07aed71c192a911e295063626364d5f4809fec 100644 (file)
@@ -46,7 +46,7 @@ namespace ParaMEDMEM
     static MEDCalculatorDBFieldReal *New(const MEDCalculatorBrowserField& ls);
     static MEDCalculatorDBFieldCst *New(double val);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     virtual MEDCalculatorDBField *operator+(const MEDCalculatorDBField& other) const throw(INTERP_KERNEL::Exception) = 0;
     MEDCalculatorDBField *operator+(double val) const throw(INTERP_KERNEL::Exception);
     virtual MEDCalculatorDBField *operator-(const MEDCalculatorDBField& other) const throw(INTERP_KERNEL::Exception) = 0;
index b559c079b23fcad132a12914b56c57679ed53cce..4916d01f2d305142455509e93952b6f14a4dc29a 100644 (file)
@@ -41,9 +41,9 @@ std::size_t MEDCalculatorDBSliceField::getHeapMemorySizeWithoutChildren() const
   return 0;
 }
 
-std::vector<RefCountObject *> MEDCalculatorDBSliceField::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCalculatorDBSliceField::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 void MEDCalculatorDBSliceField::setField(MEDCouplingFieldDouble *f) const
index 35de50da9eb668ea01f7ea9a2873bbf8efea3c8f..464b1b83bfc5d82abc35f31f9714ce9a336a7c21 100644 (file)
@@ -41,7 +41,7 @@ namespace ParaMEDMEM
     MEDCalculatorDBSliceField(int iter, int order);
     MEDCalculatorDBSliceField(MEDCouplingFieldDouble *f);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     bool isFetched() const { return _field!=0; }
     void getDtIt(int& it, int& order) const { it=_iteration;  order=_order; }
     void setField(MEDCouplingFieldDouble *f) const;
index 8805521823a1ef1403b40e8bfe270de4c23fa071..329d1b3869c2d2cc11aec8f00103c56d9ba61824 100644 (file)
@@ -572,12 +572,12 @@ std::size_t MEDCoupling1SGTUMesh::getHeapMemorySizeWithoutChildren() const
   return MEDCoupling1GTUMesh::getHeapMemorySizeWithoutChildren();
 }
 
-std::vector<RefCountObject *> MEDCoupling1SGTUMesh::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCoupling1SGTUMesh::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret(MEDCoupling1GTUMesh::getDirectChildren());
+  std::vector<const BigMemoryObject *> ret(MEDCoupling1GTUMesh::getDirectChildren());
   const DataArrayInt *c(_conn);
   if(c)
-    ret.push_back(const_cast<DataArrayInt *>(c));
+    ret.push_back(c);
   return ret;
 }
 
@@ -1909,15 +1909,15 @@ std::size_t MEDCoupling1DGTUMesh::getHeapMemorySizeWithoutChildren() const
   return MEDCoupling1GTUMesh::getHeapMemorySizeWithoutChildren();
 }
 
-std::vector<RefCountObject *> MEDCoupling1DGTUMesh::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCoupling1DGTUMesh::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret(MEDCoupling1GTUMesh::getDirectChildren());
+  std::vector<const BigMemoryObject *> ret(MEDCoupling1GTUMesh::getDirectChildren());
   const DataArrayInt *c(_conn);
   if(c)
-    ret.push_back(const_cast<DataArrayInt *>(c));
+    ret.push_back(c);
   c=_conn_indx;
   if(c)
-    ret.push_back(const_cast<DataArrayInt *>(c));
+    ret.push_back(c);
   return ret;
 }
 
index bb51d043e8271ff6006626967c3fc998e472d6c7..a6e01a72db26b819908144c101688ecdc3b0f74b 100644 (file)
@@ -94,7 +94,7 @@ namespace ParaMEDMEM
     // overload of TimeLabel and RefCountObject
     MEDCOUPLING_EXPORT void updateTime() const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
-    MEDCOUPLING_EXPORT std::vector<RefCountObject *> getDirectChildren() const;
+    MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
     // overload of MEDCouplingMesh
     MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return SINGLE_STATIC_GEO_TYPE_UNSTRUCTURED; }
     MEDCOUPLING_EXPORT MEDCouplingMesh *deepCpy() const;
@@ -179,7 +179,7 @@ namespace ParaMEDMEM
     // overload of TimeLabel and RefCountObject
     MEDCOUPLING_EXPORT void updateTime() const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
-    MEDCOUPLING_EXPORT std::vector<RefCountObject *> getDirectChildren() const;
+    MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
     // overload of MEDCouplingMesh
     MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return SINGLE_DYNAMIC_GEO_TYPE_UNSTRUCTURED; }
     MEDCOUPLING_EXPORT MEDCouplingMesh *deepCpy() const;
index 70d3c7a6a6f35c01316a26a57f64637547ad8e51..fa0e74eb5dede64ca2dbaf03db4bf4f1ffbc0d43 100644 (file)
@@ -111,15 +111,15 @@ std::size_t MEDCouplingCMesh::getHeapMemorySizeWithoutChildren() const
   return MEDCouplingStructuredMesh::getHeapMemorySizeWithoutChildren();
 }
 
-std::vector<RefCountObject *> MEDCouplingCMesh::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingCMesh::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   if(_x_array)
-    ret.push_back(const_cast<DataArrayDouble *>(_x_array));
+    ret.push_back(_x_array);
   if(_y_array)
-    ret.push_back(const_cast<DataArrayDouble *>(_y_array));
+    ret.push_back(_y_array);
   if(_z_array)
-    ret.push_back(const_cast<DataArrayDouble *>(_z_array));
+    ret.push_back(_z_array);
   return ret;
 }
 
index 6d1cba871785f8c9ad10cda07a426e7fceaf9a6d..fbaa5b02101f94a4761e8cca1bb09724b429b91a 100644 (file)
@@ -38,7 +38,7 @@ namespace ParaMEDMEM
     MEDCouplingCMesh *clone(bool recDeepCpy) const;
     void updateTime() const;
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDCouplingMeshType getType() const { return CARTESIAN; }
     void copyTinyStringsFrom(const MEDCouplingMesh *other) throw(INTERP_KERNEL::Exception);
     bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception);
index 31ecee0948ec9ede082608a933374ada4bae4a68..0bd1deb4948687b9b18d7083adad75c8f3dfd414 100644 (file)
@@ -87,11 +87,11 @@ std::size_t MEDCouplingCurveLinearMesh::getHeapMemorySizeWithoutChildren() const
   return ret;
 }
 
-std::vector<RefCountObject *> MEDCouplingCurveLinearMesh::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingCurveLinearMesh::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   if((const DataArrayDouble *)_coords)
-    ret.push_back(const_cast<DataArrayDouble *>((const DataArrayDouble *)_coords));
+    ret.push_back((const DataArrayDouble *)_coords);
   return ret;
 }
 
index 13df6d043e7a4021f9756f2890f776ca9aaa224a..94f7a6424f9324f9cfb1e42022f27f404db34373 100644 (file)
@@ -39,7 +39,7 @@ namespace ParaMEDMEM
     MEDCouplingCurveLinearMesh *clone(bool recDeepCpy) const;
     void updateTime() const;
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDCouplingMeshType getType() const { return CURVE_LINEAR; }
     void copyTinyStringsFrom(const MEDCouplingMesh *other) throw(INTERP_KERNEL::Exception);
     bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception);
index 19e4524618054afba1b36612b63f9a99719e0f25..e3adbed2ce485843ded8b94e5b26af0f28e2a774 100644 (file)
@@ -114,9 +114,9 @@ std::size_t MEDCouplingDefinitionTimeSlice::getHeapMemorySizeWithoutChildren() c
   return 0;
 }
 
-std::vector<RefCountObject *> MEDCouplingDefinitionTimeSlice::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingDefinitionTimeSlice::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 bool MEDCouplingDefinitionTimeSlice::isFullyIncludedInMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const
@@ -474,9 +474,9 @@ std::size_t MEDCouplingDefinitionTime::getHeapMemorySizeWithoutChildren() const
   return _slices.capacity()*(sizeof(MEDCouplingDefinitionTimeSlice)+sizeof(int));
 }
 
-std::vector<RefCountObject *> MEDCouplingDefinitionTime::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingDefinitionTime::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 void MEDCouplingDefinitionTime::assign(const MEDCouplingDefinitionTime& other)
index deb519243fdf864716d1ba553dd48b6dedb3ee5e..cc3c6c88bc2252e8d1a7005e1752864e5071aa36 100644 (file)
@@ -52,7 +52,7 @@ namespace ParaMEDMEM
     virtual void getTinySerializationInformation(std::vector<int>& tiI, std::vector<double>& tiD) const = 0;
     virtual TypeOfTimeDiscretization getTimeType() const = 0;
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     bool isFullyIncludedInMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const;
     bool isOverllapingWithMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const;
     bool isAfterMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const;
@@ -145,7 +145,7 @@ namespace ParaMEDMEM
     MEDCouplingDefinitionTime();
     MEDCouplingDefinitionTime(const std::vector<const MEDCouplingFieldDouble *>& fs, const std::vector<int>& meshRefs, const std::vector<std::vector<int> >& arrRefs) throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     void assign(const MEDCouplingDefinitionTime& other);
     bool isEqual(const MEDCouplingDefinitionTime& other) const;
     double getTimeResolution() const { return _eps; }
index 14a29179d878a0f516275f8a8ced18a4af573f79..c5a585b88ad2ad506e4d3f4df1c5693beaf89a87 100644 (file)
@@ -69,15 +69,15 @@ std::size_t MEDCouplingExtrudedMesh::getHeapMemorySizeWithoutChildren() const
   return MEDCouplingMesh::getHeapMemorySizeWithoutChildren();
 }
 
-std::vector<RefCountObject *> MEDCouplingExtrudedMesh::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingExtrudedMesh::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   if(_mesh2D)
-    ret.push_back(const_cast<MEDCouplingUMesh *>(_mesh2D));
+    ret.push_back(_mesh2D);
   if(_mesh1D)
-    ret.push_back(const_cast<MEDCouplingUMesh *>(_mesh1D));
+    ret.push_back(_mesh1D);
   if(_mesh3D_ids)
-    ret.push_back(const_cast<DataArrayInt *>(_mesh3D_ids));
+    ret.push_back(_mesh3D_ids);
   return ret;
 }
 
index 8aa72199df8cd87e5e25debc215a2a036e8e34e6..40f78aab53c628c692b9ac6426b649ae327ee653 100644 (file)
@@ -40,7 +40,7 @@ namespace ParaMEDMEM
     static MEDCouplingExtrudedMesh *New();
     MEDCouplingMeshType getType() const;
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     void copyTinyStringsFrom(const MEDCouplingMesh *other) throw(INTERP_KERNEL::Exception);
     int getNumberOfCells() const;
     int getNumberOfNodes() const;
index c7813180aa25a004229a67dbf6fd6149bf2f65ec..f96321bb1adc41ffb88f1e80c8b2494b821c1e74 100644 (file)
@@ -161,13 +161,13 @@ std::size_t MEDCouplingField::getHeapMemorySizeWithoutChildren() const
   return ret;
 }
 
-std::vector<RefCountObject *> MEDCouplingField::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingField::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   if(_mesh)
-    ret.push_back(const_cast<MEDCouplingMesh *>(_mesh));
+    ret.push_back(_mesh);
   if((const MEDCouplingFieldDiscretization *)_type)
-    ret.push_back(const_cast<MEDCouplingFieldDiscretization *>((const MEDCouplingFieldDiscretization *)_type));
+    ret.push_back((const MEDCouplingFieldDiscretization *)_type);
   return ret;
 }
 
index 5cf5bbf080cfff1deb757e9c8eea147ade7370c4..fd18e0c8275e66f1329826c880abbe0cd2b40741 100644 (file)
@@ -85,7 +85,7 @@ namespace ParaMEDMEM
     const MEDCouplingGaussLocalization& getGaussLocalization(int locId) const throw(INTERP_KERNEL::Exception);
     void updateTime() const;
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     // for MED file RW
     int getNumberOfTuplesExpectedRegardingCode(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const throw(INTERP_KERNEL::Exception);
     virtual void reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception) = 0;
index 9e493da4193914f18e2e07ed6f4de554cc7e0c4a..aa17d7bb14f84009675c5d07f1071af6f33ac4a3 100644 (file)
@@ -184,9 +184,9 @@ std::size_t MEDCouplingFieldDiscretization::getHeapMemorySizeWithoutChildren() c
   return 0;
 }
 
-std::vector<RefCountObject *> MEDCouplingFieldDiscretization::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingFieldDiscretization::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 /*!
@@ -1080,11 +1080,11 @@ std::size_t MEDCouplingFieldDiscretizationPerCell::getHeapMemorySizeWithoutChild
   return ret;
 }
 
-std::vector<RefCountObject *> MEDCouplingFieldDiscretizationPerCell::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingFieldDiscretizationPerCell::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret(MEDCouplingFieldDiscretization::getDirectChildren());
+  std::vector<const BigMemoryObject *> ret(MEDCouplingFieldDiscretization::getDirectChildren());
   if(_discr_per_cell)
-    ret.push_back(const_cast<DataArrayInt *>(_discr_per_cell));
+    ret.push_back(_discr_per_cell);
   return ret;
 }
 
index a56d3b25cc4dba2386d2c57202565f41c0598902..effe0bbc72684d474ac38fa372b9d75650eb3c35 100644 (file)
@@ -48,7 +48,7 @@ namespace ParaMEDMEM
     void setPrecision(double val) { _precision=val; }
     void updateTime() const;
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     static TypeOfField GetTypeOfFieldFromStringRepr(const char *repr) throw(INTERP_KERNEL::Exception);
     virtual TypeOfField getEnum() const = 0;
     virtual bool isEqual(const MEDCouplingFieldDiscretization *other, double eps) const;
@@ -210,7 +210,7 @@ namespace ParaMEDMEM
     ~MEDCouplingFieldDiscretizationPerCell();
     void updateTime() const;
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const throw(INTERP_KERNEL::Exception);
     bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
     bool isEqualWithoutConsideringStr(const MEDCouplingFieldDiscretization *other, double eps) const;
index 954408c64c2fc164c57e6b73c1718e9032a35ee0..c2208f82b5ad4fe98c0e71a796595fe40c88cf17 100644 (file)
@@ -1785,12 +1785,12 @@ std::size_t MEDCouplingFieldDouble::getHeapMemorySizeWithoutChildren() const
   return MEDCouplingField::getHeapMemorySizeWithoutChildren();
 }
 
-std::vector<RefCountObject *> MEDCouplingFieldDouble::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingFieldDouble::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret(MEDCouplingField::getDirectChildren());
+  std::vector<const BigMemoryObject *> ret(MEDCouplingField::getDirectChildren());
   if(_time_discr)
     {
-      std::vector<RefCountObject *> ret2(_time_discr->getDirectChildren());
+      std::vector<const BigMemoryObject *> ret2(_time_discr->getDirectChildren());
       ret.insert(ret.end(),ret2.begin(),ret2.end());
     }
   return ret;
index a99041fede1f34a765a58f600d49f0ae4f73ed6e..0bd5419f8f0ab99b0ae9fde54a087209bae265cb 100644 (file)
@@ -131,7 +131,7 @@ namespace ParaMEDMEM
     int getNumberOfValues() const throw(INTERP_KERNEL::Exception);
     void updateTime() const;
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     //
     void getTinySerializationIntInformation(std::vector<int>& tinyInfo) const;
     void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
index 3dc5f450decc7325bfac9422e264cd9f6596bda4..67edb173c2774fdf1f7869398dff497726ad75d7 100644 (file)
@@ -120,9 +120,9 @@ std::size_t DataArray::getHeapMemorySizeWithoutChildren() const
   return sz1+sz2+sz3;
 }
 
-std::vector<RefCountObject *> DataArray::getDirectChildren() const
+std::vector<const BigMemoryObject *> DataArray::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 /*!
index 6000da785e05b1cc94b9b0ff5c9377100ba7f389..a28f2dfdfb13e3cb28e520dc56340301f00737c7 100644 (file)
@@ -116,7 +116,7 @@ namespace ParaMEDMEM
   {
   public:
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
-    MEDCOUPLING_EXPORT std::vector<RefCountObject *> getDirectChildren() const;
+    MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDCOUPLING_EXPORT void setName(const char *name);
     MEDCOUPLING_EXPORT void copyStringInfoFrom(const DataArray& other) throw(INTERP_KERNEL::Exception);
     MEDCOUPLING_EXPORT void copyPartOfStringInfoFrom(const DataArray& other, const std::vector<int>& compoIds) throw(INTERP_KERNEL::Exception);
index 436ab8d20c53ff213b8c9e5f7062cdfbd0141b88..97653a8b2b611a0745427b44ca30b8c7524a01f7 100644 (file)
@@ -195,14 +195,14 @@ std::size_t MEDCouplingMultiFields::getHeapMemorySizeWithoutChildren() const
   return 0;
 }
 
-std::vector<RefCountObject *> MEDCouplingMultiFields::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingMultiFields::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> >::const_iterator it=_fs.begin();it!=_fs.end();it++)
     {
       const MEDCouplingFieldDouble *curF(*it);
       if(curF)
-        ret.push_back(const_cast<MEDCouplingFieldDouble *>(curF));
+        ret.push_back(curF);
     }
   return ret;
 }
index d770576e225a90c670cde3523e9790f58d2b03aa..d31b816abbbf0bd34a59faea398d2f89222402c5 100644 (file)
@@ -60,7 +60,7 @@ namespace ParaMEDMEM
     virtual std::vector<DataArrayDouble *> getDifferentArrays(std::vector< std::vector<int> >& refs) const throw(INTERP_KERNEL::Exception);
     void updateTime() const;
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     void getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<double>& tinyInfo2, int& nbOfDiffMeshes, int& nbOfDiffArr) const;
     void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD,
                                const std::vector<MEDCouplingFieldTemplate *>& ft, const std::vector<MEDCouplingMesh *>& ms,
index 8c3fb4660b58f1087fe928c2fbe905fe45087009..6d90de50803e45fa2a9b1e86204944a2dbe189ea 100644 (file)
@@ -80,11 +80,11 @@ std::size_t MEDCouplingPointSet::getHeapMemorySizeWithoutChildren() const
   return MEDCouplingMesh::getHeapMemorySizeWithoutChildren();
 }
 
-std::vector<RefCountObject *> MEDCouplingPointSet::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingPointSet::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   if(_coords)
-    ret.push_back(const_cast<DataArrayDouble *>(_coords));
+    ret.push_back(_coords);
   return ret;
 }
 
index df12ac7b29da75be4f9dd039da3e574e35e19a7a..c591ac655092962a24661fff766abba1bb67160b 100644 (file)
@@ -53,7 +53,7 @@ namespace ParaMEDMEM
   public:
     void updateTime() const;
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     int getNumberOfNodes() const;
     int getSpaceDimension() const;
     void setCoords(const DataArrayDouble *coords);
index 49d954f8e217cd25a4692976e8409cdd75b27bd0..39794d403244ec9746667c94fc3018b66fcf281e 100644 (file)
@@ -71,39 +71,24 @@ const char *ParaMEDMEM::MEDCouplingByteOrderStr()
     return BIGENDIAN_STR;
 }
 
-RefCountObject::RefCountObject():_cnt(1)
-{
-}
+//=
 
-RefCountObject::RefCountObject(const RefCountObject& other):_cnt(1)
-{
-}
-
-/*!
- * Do nothing here ! It is not a bug ( I hope :) ) because all subclasses that
- * copies using operator= should not copy the ref counter of \a other !
- */
-RefCountObject& RefCountObject::operator=(const RefCountObject& other)
-{
-  return *this;
-}
-
-std::size_t RefCountObject::getHeapMemorySize() const
+std::size_t BigMemoryObject::getHeapMemorySize() const
 {
   std::size_t ret(getHeapMemorySizeWithoutChildren());
-  std::vector<RefCountObject *> v(getDirectChildren());
-  std::set<RefCountObject *> s1,s2(v.begin(),v.end());
+  std::vector<const BigMemoryObject *> v(getDirectChildren());
+  std::set<const BigMemoryObject *> s1,s2(v.begin(),v.end());
   while(!s2.empty())
     {
-      std::set<RefCountObject *> s3;
-      for(std::set<RefCountObject *>::const_iterator it=s2.begin();it!=s2.end();it++)
+      std::set<const BigMemoryObject *> s3;
+      for(std::set<const BigMemoryObject *>::const_iterator it=s2.begin();it!=s2.end();it++)
         {
           if(s1.find(*it)==s1.end())
             {
               ret+=(*it)->getHeapMemorySizeWithoutChildren();
               s1.insert(*it);
-              std::vector<RefCountObject *> v2((*it)->getDirectChildren());
-              for(std::vector<RefCountObject *>::const_iterator it2=v2.begin();it2!=v2.end();it2++)
+              std::vector<const BigMemoryObject *> v2((*it)->getDirectChildren());
+              for(std::vector<const BigMemoryObject *>::const_iterator it2=v2.begin();it2!=v2.end();it2++)
                 if(s1.find(*it2)==s1.end())
                   s3.insert(*it2);
             }
@@ -113,7 +98,7 @@ std::size_t RefCountObject::getHeapMemorySize() const
   return ret;
 }
 
-std::string RefCountObject::getHeapMemorySizeStr() const
+std::string BigMemoryObject::getHeapMemorySizeStr() const
 {
   static const char *UNITS[4]={"B","kB","MB","GB"};
   std::size_t m(getHeapMemorySize());
@@ -153,7 +138,21 @@ std::string RefCountObject::getHeapMemorySizeStr() const
   return oss.str();
 }
 
-bool RefCountObject::decrRef() const
+BigMemoryObject::~BigMemoryObject()
+{
+}
+
+//=
+
+RefCountObjectOnly::RefCountObjectOnly():_cnt(1)
+{
+}
+
+RefCountObjectOnly::RefCountObjectOnly(const RefCountObjectOnly& other):_cnt(1)
+{
+}
+
+bool RefCountObjectOnly::decrRef() const
 {
   bool ret=((--_cnt)==0);
   if(ret)
@@ -161,16 +160,39 @@ bool RefCountObject::decrRef() const
   return ret;
 }
 
-void RefCountObject::incrRef() const
+void RefCountObjectOnly::incrRef() const
 {
   _cnt++;
 }
 
-int RefCountObject::getRCValue() const
+int RefCountObjectOnly::getRCValue() const
 {
   return _cnt;
 }
 
+RefCountObjectOnly::~RefCountObjectOnly()
+{
+}
+
+/*!
+ * Do nothing here ! It is not a bug ( I hope :) ) because all subclasses that
+ * copies using operator= should not copy the ref counter of \a other !
+ */
+RefCountObjectOnly& RefCountObjectOnly::operator=(const RefCountObjectOnly& other)
+{
+  return *this;
+}
+
+//=
+
+RefCountObject::RefCountObject()
+{
+}
+
+RefCountObject::RefCountObject(const RefCountObject& other):RefCountObjectOnly(other)
+{
+}
+
 RefCountObject::~RefCountObject()
 {
 }
index 3d987d706e4825f11b83c4dbd412efc3df22a628..ce51360d2ab0ac91d8868c2f4a9a49a7597f17f8 100644 (file)
@@ -61,25 +61,39 @@ namespace ParaMEDMEM
   MEDCOUPLING_EXPORT bool MEDCouplingByteOrder();
   MEDCOUPLING_EXPORT const char *MEDCouplingByteOrderStr();
 
-  class RefCountObject
+  class BigMemoryObject
   {
-  protected:
-    RefCountObject();
-    RefCountObject(const RefCountObject& other);
   public:
-    MEDCOUPLING_EXPORT bool decrRef() const;
-    MEDCOUPLING_EXPORT void incrRef() const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySize() const;
     MEDCOUPLING_EXPORT std::string getHeapMemorySizeStr() const;
     MEDCOUPLING_EXPORT virtual std::size_t getHeapMemorySizeWithoutChildren() const = 0;
-    MEDCOUPLING_EXPORT virtual std::vector<RefCountObject *> getDirectChildren() const = 0;
+    MEDCOUPLING_EXPORT virtual std::vector<const BigMemoryObject *> getDirectChildren() const = 0;
+    MEDCOUPLING_EXPORT virtual ~BigMemoryObject();
+  };
+  
+  class RefCountObjectOnly
+  {
+  protected:
+    RefCountObjectOnly();
+    RefCountObjectOnly(const RefCountObjectOnly& other);
+  public:
+    MEDCOUPLING_EXPORT bool decrRef() const;
+    MEDCOUPLING_EXPORT void incrRef() const;
     MEDCOUPLING_EXPORT int getRCValue() const;
-    MEDCOUPLING_EXPORT RefCountObject& operator=(const RefCountObject& other);
+    MEDCOUPLING_EXPORT RefCountObjectOnly& operator=(const RefCountObjectOnly& other);
   protected:
-    virtual ~RefCountObject();
+    virtual ~RefCountObjectOnly();
   private:
     mutable int _cnt;
   };
+
+  class RefCountObject : public RefCountObjectOnly, public BigMemoryObject
+  {
+  protected:
+    RefCountObject();
+    RefCountObject(const RefCountObject& other);
+    virtual ~RefCountObject();
+  };
 }
 
 #endif
index 7bc366262a572c0f1b3f976d1eec31338c251893..9921f7de6e3789ce7173f74df40b21faa7669dcd 100644 (file)
@@ -99,11 +99,11 @@ std::size_t MEDCouplingTimeDiscretization::getHeapMemorySizeWithoutChildren() co
   return ret;
 }
 
-std::vector<RefCountObject *> MEDCouplingTimeDiscretization::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingTimeDiscretization::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   if(_array)
-    ret.push_back(const_cast<DataArrayDouble *>(_array));
+    ret.push_back(_array);
   return ret;
 }
 
@@ -2219,11 +2219,11 @@ std::size_t MEDCouplingTwoTimeSteps::getHeapMemorySizeWithoutChildren() const
   return MEDCouplingTimeDiscretization::getHeapMemorySizeWithoutChildren();
 }
 
-std::vector<RefCountObject *> MEDCouplingTwoTimeSteps::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingTwoTimeSteps::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret(MEDCouplingTimeDiscretization::getDirectChildren());
+  std::vector<const BigMemoryObject *> ret(MEDCouplingTimeDiscretization::getDirectChildren());
   if(_end_array)
-    ret.push_back(const_cast<DataArrayDouble *>(_end_array));
+    ret.push_back(_end_array);
   return ret;
 }
 
index 15641eabfa80f4ec4852a4f0697963ccbe329141..34b04208ec745a2f0e68bf2169b71572221a430f 100644 (file)
@@ -34,7 +34,7 @@ namespace ParaMEDMEM
   class DataArrayDouble;
   class TimeLabel;
 
-  class MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization : public TimeLabel
+  class MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization : public TimeLabel, public BigMemoryObject
   {
   protected:
     MEDCouplingTimeDiscretization();
@@ -42,7 +42,7 @@ namespace ParaMEDMEM
   public:
     void updateTime() const;
     virtual std::size_t getHeapMemorySizeWithoutChildren() const;
-    virtual std::vector<RefCountObject *> getDirectChildren() const;
+    virtual std::vector<const BigMemoryObject *> getDirectChildren() const;
     static MEDCouplingTimeDiscretization *New(TypeOfTimeDiscretization type) throw(INTERP_KERNEL::Exception);
     void setTimeUnit(const char *unit) { _time_unit=unit; }
     const char *getTimeUnit() const { return _time_unit.c_str(); }
@@ -369,7 +369,7 @@ namespace ParaMEDMEM
     void updateTime() const;
     void synchronizeTimeWith(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     void copyTinyAttrFrom(const MEDCouplingTimeDiscretization& other) throw(INTERP_KERNEL::Exception);
     void copyTinyStringsFrom(const MEDCouplingTimeDiscretization& other) throw(INTERP_KERNEL::Exception);
     const DataArrayDouble *getEndArray() const throw(INTERP_KERNEL::Exception);
index 53dd0d55fa086b8c14355b51d4e0d3719d99b186..7f8032783bea695404a07b33ef49abf822539797 100644 (file)
@@ -121,13 +121,13 @@ std::size_t MEDCouplingUMesh::getHeapMemorySizeWithoutChildren() const
   return ret;
 }
 
-std::vector<RefCountObject *> MEDCouplingUMesh::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingUMesh::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret(MEDCouplingPointSet::getDirectChildren());
+  std::vector<const BigMemoryObject *> ret(MEDCouplingPointSet::getDirectChildren());
   if(_nodal_connec)
-    ret.push_back(const_cast<DataArrayInt *>(_nodal_connec));
+    ret.push_back(_nodal_connec);
   if(_nodal_connec_index)
-    ret.push_back(const_cast<DataArrayInt *>(_nodal_connec_index));
+    ret.push_back(_nodal_connec_index);
   return ret;
 }
 
index 4c75c0af561afae9574c3868bab2f91a1196685e..e11d0c993666bbba9d912b82c97986249d18218a 100644 (file)
@@ -47,7 +47,7 @@ namespace ParaMEDMEM
     MEDCOUPLING_EXPORT void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other) throw(INTERP_KERNEL::Exception);
     MEDCOUPLING_EXPORT void updateTime() const;
     MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
-    MEDCOUPLING_EXPORT std::vector<RefCountObject *> getDirectChildren() const;
+    MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return UNSTRUCTURED; }
     MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception);
     MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
index df1fa3a07030ee78f0944dbae0ceb6dde10f852c..4d746d201e4eade79e45050541ec03202e2acf6a 100644 (file)
@@ -558,18 +558,41 @@ namespace ParaMEDMEM
   bool MEDCouplingByteOrder();
   const char *MEDCouplingByteOrderStr();
 
-  class RefCountObject
+  class BigMemoryObject
+  {
+  public:
+    std::size_t getHeapMemorySize() const;
+    std::string getHeapMemorySizeStr() const;
+    virtual std::size_t getHeapMemorySizeWithoutChildren() const;
+    virtual ~BigMemoryObject();
+    %extend
+    {
+      virtual PyObject *getDirectChildren() const
+      {
+        std::vector<const BigMemoryObject *> c(self->getDirectChildren());
+        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;
+      }
+    }
+  };
+  
+  class RefCountObjectOnly
   {
-  protected:
-    RefCountObject();
-    RefCountObject(const RefCountObject& other);
-    ~RefCountObject();
   public:
     bool decrRef() const;
     void incrRef() const;
     int getRCValue() const;
-    std::size_t getHeapMemorySize() const;
-    std::string RefCountObject::getHeapMemorySizeStr() const;
+    RefCountObjectOnly& operator=(const RefCountObjectOnly& other);
+  protected:
+    ~RefCountObjectOnly();
+  };
+
+  class RefCountObject : public RefCountObjectOnly, public BigMemoryObject
+  {
+  protected:
+    ~RefCountObject();
   };
 }
 
index 2c2646424aa9ab9baeecc7c4bfcc2ddbdf6a5aa8..862d429e019c84e20cec084465416c3d1d0a3655 100644 (file)
@@ -53,15 +53,15 @@ std::size_t MEDFileData::getHeapMemorySizeWithoutChildren() const
   return 0;
 }
 
-std::vector<RefCountObject *> MEDFileData::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileData::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   if((const MEDFileFields *)_fields)
-    ret.push_back(const_cast<MEDFileFields *>((const MEDFileFields *)_fields));
+    ret.push_back((const MEDFileFields *)_fields);
   if((const MEDFileMeshes *)_meshes)
-    ret.push_back(const_cast<MEDFileMeshes *>((const MEDFileMeshes *)_meshes));
+    ret.push_back((const MEDFileMeshes *)_meshes);
   if((const MEDFileParameters *)_params)
-    ret.push_back(const_cast<MEDFileParameters *>((const MEDFileParameters *)_params));
+    ret.push_back((const MEDFileParameters *)_params);
   return ret;
   
 }
index 31411500e704cbd378fa885358ec0b6d089b8014..22322021bc03fd15fc79c8651d96262bc5b658fe 100644 (file)
@@ -38,7 +38,7 @@ namespace ParaMEDMEM
     static MEDFileData *New();
     MEDFileData *deepCpy() const throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDFileFields *getFields() const;
     MEDFileMeshes *getMeshes() const;
     MEDFileParameters *getParams() const;
index 0a712f93c38839295f102777fbceddc364eebef9..13d1a7f21d2efcd2e49336b602324eaaae84ff7b 100644 (file)
@@ -114,9 +114,9 @@ std::size_t MEDFileFieldLoc::getHeapMemorySizeWithoutChildren() const
   return (_ref_coo.capacity()+_gs_coo.capacity()+_w.capacity())*sizeof(double)+_name.capacity();
 }
 
-std::vector<RefCountObject *> MEDFileFieldLoc::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileFieldLoc::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 void MEDFileFieldLoc::simpleRepr(std::ostream& oss) const
@@ -412,9 +412,9 @@ std::size_t MEDFileFieldPerMeshPerTypePerDisc::getHeapMemorySizeWithoutChildren(
   return _profile.capacity()+_localization.capacity()+5*sizeof(int);
 }
 
-std::vector<RefCountObject *> MEDFileFieldPerMeshPerTypePerDisc::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileFieldPerMeshPerTypePerDisc::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 MEDFileFieldPerMeshPerTypePerDisc *MEDFileFieldPerMeshPerTypePerDisc::deepCpy(MEDFileFieldPerMeshPerType *father) const throw(INTERP_KERNEL::Exception)
@@ -983,14 +983,14 @@ std::size_t MEDFileFieldPerMeshPerType::getHeapMemorySizeWithoutChildren() const
   return _field_pm_pt_pd.capacity()*sizeof(MEDCouplingAutoRefCountObjectPtr<MEDFileFieldPerMeshPerTypePerDisc>);
 }
 
-std::vector<RefCountObject *> MEDFileFieldPerMeshPerType::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileFieldPerMeshPerType::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldPerMeshPerTypePerDisc> >::const_iterator it=_field_pm_pt_pd.begin();it!=_field_pm_pt_pd.end();it++)
     {
       const MEDFileFieldPerMeshPerTypePerDisc *cur(*it);
       if(cur)
-        ret.push_back(const_cast<MEDFileFieldPerMeshPerTypePerDisc *>(cur));
+        ret.push_back(cur);
     }
   return ret;
 }
@@ -1545,14 +1545,14 @@ std::size_t MEDFileFieldPerMesh::getHeapMemorySizeWithoutChildren() const
   return _mesh_name.capacity()+_field_pm_pt.capacity()*sizeof(MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMeshPerType >);
 }
 
-std::vector<RefCountObject *> MEDFileFieldPerMesh::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileFieldPerMesh::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMeshPerType > >::const_iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++)
     {
       const MEDFileFieldPerMeshPerType *cur(*it);
       if(cur)
-        ret.push_back(const_cast<MEDFileFieldPerMeshPerType *>(cur));
+        ret.push_back(cur);
     }
   return ret;
 }
@@ -2534,20 +2534,20 @@ std::size_t MEDFileFieldGlobs::getHeapMemorySizeWithoutChildren() const
   return _file_name.capacity()+_pfls.capacity()*sizeof(MEDCouplingAutoRefCountObjectPtr<DataArrayInt>)+_locs.capacity()*sizeof(MEDCouplingAutoRefCountObjectPtr<MEDFileFieldLoc>);
 }
 
-std::vector<RefCountObject *> MEDFileFieldGlobs::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileFieldGlobs::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   for(std::vector< MEDCouplingAutoRefCountObjectPtr< DataArrayInt > >::const_iterator it=_pfls.begin();it!=_pfls.end();it++)
     {
       const DataArrayInt *cur(*it);
       if(cur)
-        ret.push_back(const_cast<DataArrayInt *>(cur));
+        ret.push_back(cur);
     }
   for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldLoc> >::const_iterator it=_locs.begin();it!=_locs.end();it++)
     {
       const MEDFileFieldLoc *cur(*it);
       if(cur)
-        ret.push_back(const_cast<MEDFileFieldLoc *>(cur));
+        ret.push_back(cur);
     }
   return ret;
 }
@@ -3003,11 +3003,11 @@ std::size_t MEDFileFieldGlobsReal::getHeapMemorySizeWithoutChildren() const
   return 0;
 }
 
-std::vector<RefCountObject *> MEDFileFieldGlobsReal::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileFieldGlobsReal::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   if((const MEDFileFieldGlobs *)_globals)
-    ret.push_back(const_cast<MEDFileFieldGlobs *>((const MEDFileFieldGlobs *)_globals));
+    ret.push_back((const MEDFileFieldGlobs *)_globals);
   return ret;
 }
 
@@ -4237,16 +4237,16 @@ std::size_t MEDFileAnyTypeField1TSWithoutSDA::getHeapMemorySizeWithoutChildren()
   return _dt_unit.capacity()+_field_per_mesh.capacity()*sizeof(MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMesh >);
 }
 
-std::vector<RefCountObject *> MEDFileAnyTypeField1TSWithoutSDA::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileAnyTypeField1TSWithoutSDA::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   if(getUndergroundDataArray())
-    ret.push_back(const_cast<DataArray *>(getUndergroundDataArray()));
+    ret.push_back(getUndergroundDataArray());
   for(std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMesh > >::const_iterator it=_field_per_mesh.begin();it!=_field_per_mesh.end();it++)
     {
       const MEDFileFieldPerMesh *cur(*it);
       if(cur)
-        ret.push_back(const_cast<MEDFileFieldPerMesh *>(cur));
+        ret.push_back(cur);
     }
   return ret;
 }
@@ -5623,11 +5623,11 @@ std::size_t MEDFileAnyTypeField1TS::getHeapMemorySizeWithoutChildren() const
   return MEDFileFieldGlobsReal::getHeapMemorySizeWithoutChildren();
 }
 
-std::vector<RefCountObject *> MEDFileAnyTypeField1TS::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileAnyTypeField1TS::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret(MEDFileFieldGlobsReal::getDirectChildren());
+  std::vector<const BigMemoryObject *> ret(MEDFileFieldGlobsReal::getDirectChildren());
   if((const MEDFileAnyTypeField1TSWithoutSDA *)_content)
-    ret.push_back(const_cast<MEDFileAnyTypeField1TSWithoutSDA *>((const MEDFileAnyTypeField1TSWithoutSDA *)_content));
+    ret.push_back((const MEDFileAnyTypeField1TSWithoutSDA *)_content);
   return ret;
 }
 
@@ -6730,14 +6730,14 @@ std::size_t MEDFileAnyTypeFieldMultiTSWithoutSDA::getHeapMemorySizeWithoutChildr
   return ret;
 }
 
-std::vector<RefCountObject *> MEDFileAnyTypeFieldMultiTSWithoutSDA::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileAnyTypeFieldMultiTSWithoutSDA::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeField1TSWithoutSDA> >::const_iterator it=_time_steps.begin();it!=_time_steps.end();it++)
     {
       const MEDFileAnyTypeField1TSWithoutSDA *cur(*it);
       if(cur)
-        ret.push_back(const_cast<MEDFileAnyTypeField1TSWithoutSDA *>(cur));
+        ret.push_back(cur);
     }
   return ret;
 }
@@ -8189,11 +8189,11 @@ std::size_t MEDFileAnyTypeFieldMultiTS::getHeapMemorySizeWithoutChildren() const
   return MEDFileFieldGlobsReal::getHeapMemorySizeWithoutChildren();
 }
 
-std::vector<RefCountObject *> MEDFileAnyTypeFieldMultiTS::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileAnyTypeFieldMultiTS::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret(MEDFileFieldGlobsReal::getDirectChildren());
+  std::vector<const BigMemoryObject *> ret(MEDFileFieldGlobsReal::getDirectChildren());
   if((const MEDFileAnyTypeFieldMultiTSWithoutSDA *)_content)
-    ret.push_back(const_cast<MEDFileAnyTypeFieldMultiTSWithoutSDA *>((const MEDFileAnyTypeFieldMultiTSWithoutSDA *)_content));
+    ret.push_back((const MEDFileAnyTypeFieldMultiTSWithoutSDA *)_content);
   return ret;
 }
 
@@ -9363,14 +9363,14 @@ std::size_t MEDFileFields::getHeapMemorySizeWithoutChildren() const
   return ret;
 }
 
-std::vector<RefCountObject *> MEDFileFields::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileFields::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> >::const_iterator it=_fields.begin();it!=_fields.end();it++)
     {
       const MEDFileAnyTypeFieldMultiTSWithoutSDA *cur(*it);
       if(cur)
-        ret.push_back(const_cast<MEDFileAnyTypeFieldMultiTSWithoutSDA *>(cur));
+        ret.push_back(cur);
     }
   return ret;
 }
index 38a6ae1e58ff7cd9f74659c339c4e93ddd54db37..21f4594894275f32e6156793cdea65cb4a64f20a 100644 (file)
@@ -56,7 +56,7 @@ namespace ParaMEDMEM
     static MEDFileFieldLoc *New(med_idt fid, int id);
     static MEDFileFieldLoc *New(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDFileFieldLoc *deepCpy() const;
     int MEDLOADER_EXPORT getNbOfGaussPtPerCell() const { return _nb_gauss_pt; }
     void MEDLOADER_EXPORT writeLL(med_idt fid) const;
@@ -99,7 +99,7 @@ namespace ParaMEDMEM
     static MEDFileFieldPerMeshPerTypePerDisc *New(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int locId);
     static MEDFileFieldPerMeshPerTypePerDisc *New(const MEDFileFieldPerMeshPerTypePerDisc& other);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDFileFieldPerMeshPerTypePerDisc *deepCpy(MEDFileFieldPerMeshPerType *father) const throw(INTERP_KERNEL::Exception);
     void assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldDouble *field, const DataArray *arrr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
     void assignFieldProfile(int& start, const DataArrayInt *multiTypePfl, const DataArrayInt *idsInPfl, DataArrayInt *locIds, int nbOfEltsInWholeMesh, const MEDCouplingFieldDouble *field, const DataArray *arrr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
@@ -175,7 +175,7 @@ namespace ParaMEDMEM
     static MEDFileFieldPerMeshPerType *New(MEDFileFieldPerMesh *fath, INTERP_KERNEL::NormalizedCellType geoType) throw(INTERP_KERNEL::Exception);
     static MEDFileFieldPerMeshPerType *NewOnRead(med_idt fid, MEDFileFieldPerMesh *fath, TypeOfField type, INTERP_KERNEL::NormalizedCellType geoType, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDFileFieldPerMeshPerType *deepCpy(MEDFileFieldPerMesh *father) const throw(INTERP_KERNEL::Exception);
     void assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
     void assignFieldProfile(int& start, const DataArrayInt *multiTypePfl, const DataArrayInt *idsInPfl, DataArrayInt *locIds, int nbOfEltsInWholeMesh, const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDCouplingMesh *mesh, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
@@ -231,7 +231,7 @@ namespace ParaMEDMEM
     static MEDFileFieldPerMesh *New(MEDFileAnyTypeField1TSWithoutSDA *fath, const MEDCouplingMesh *mesh);
     static MEDFileFieldPerMesh *NewOnRead(med_idt fid, MEDFileAnyTypeField1TSWithoutSDA *fath, int meshCsit, int meshIteration, int meshOrder, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDFileFieldPerMesh *deepCpy(MEDFileAnyTypeField1TSWithoutSDA *father) const throw(INTERP_KERNEL::Exception);
     void simpleRepr(int bkOffset,std::ostream& oss, int id) const;
     void copyTinyInfoFrom(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
@@ -305,7 +305,7 @@ namespace ParaMEDMEM
     static MEDFileFieldGlobs *New(const char *fname);
     static MEDFileFieldGlobs *New();
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDFileFieldGlobs *deepCpy() const throw(INTERP_KERNEL::Exception);
     MEDFileFieldGlobs *shallowCpyPart(const std::vector<std::string>& pfls, const std::vector<std::string>& locs) const throw(INTERP_KERNEL::Exception);
     MEDFileFieldGlobs *deepCpyPart(const std::vector<std::string>& pfls, const std::vector<std::string>& locs) const throw(INTERP_KERNEL::Exception);
@@ -366,7 +366,7 @@ namespace ParaMEDMEM
     MEDFileFieldGlobsReal(const char *fname);
     MEDFileFieldGlobsReal();
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     void simpleReprGlobs(std::ostream& oss) const;
     void resetContent();
     void shallowCpyGlobs(const MEDFileFieldGlobsReal& other);
@@ -489,7 +489,7 @@ namespace ParaMEDMEM
     std::vector<std::string>& getInfo();
     void setInfo(const std::vector<std::string>& infos) throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     int copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr) throw(INTERP_KERNEL::Exception);
     void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
     void setFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc) throw(INTERP_KERNEL::Exception);
@@ -674,7 +674,7 @@ namespace ParaMEDMEM
     //! underground method see MEDFileField1TSWithoutSDA::setLocNameOnLeaf
     void setLocNameOnLeaf(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const char *newLocName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     std::vector<std::string> getPflsReallyUsed() const;
     std::vector<std::string> getLocsReallyUsed() const;
     std::vector<std::string> getPflsReallyUsedMulti() const;
@@ -783,7 +783,7 @@ namespace ParaMEDMEM
     MEDFileAnyTypeFieldMultiTSWithoutSDA(med_idt fid, const char *fieldName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll) throw(INTERP_KERNEL::Exception);
   public:
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *deepCpy() const throw(INTERP_KERNEL::Exception);
     virtual std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitComponents() const throw(INTERP_KERNEL::Exception);
     virtual std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitDiscretizations() const throw(INTERP_KERNEL::Exception);
@@ -914,7 +914,7 @@ namespace ParaMEDMEM
     void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
     void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     virtual MEDFileAnyTypeFieldMultiTS *deepCpy() const throw(INTERP_KERNEL::Exception);
     std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > splitComponents() const throw(INTERP_KERNEL::Exception);
     std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileAnyTypeFieldMultiTS > > splitDiscretizations() const throw(INTERP_KERNEL::Exception);
@@ -1075,7 +1075,7 @@ std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(int iterati
     static MEDFileFields *New();
     static MEDFileFields *New(const char *fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDFileFields *deepCpy() const throw(INTERP_KERNEL::Exception);
     MEDFileFields *shallowCpy() const throw(INTERP_KERNEL::Exception);
     void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
index 21f86e4523e51f697c88e3c4e6acbe6d84dcf6a1..a70e73953a14cc2f82d078a07c45de1b4901dbb6 100644 (file)
@@ -45,9 +45,9 @@ std::size_t MEDFileMeshStruct::getHeapMemorySizeWithoutChildren() const
   return ret;
 }
 
-std::vector<RefCountObject *> MEDFileMeshStruct::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileMeshStruct::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 MEDFileMeshStruct::MEDFileMeshStruct(const MEDFileMesh *mesh):_mesh(mesh)
@@ -114,9 +114,9 @@ std::size_t MEDMeshMultiLev::getHeapMemorySizeWithoutChildren() const
   return 0;
 }
 
-std::vector<RefCountObject *> MEDMeshMultiLev::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDMeshMultiLev::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 MEDMeshMultiLev *MEDMeshMultiLev::New(const MEDFileMesh *m, const std::vector<int>& levs) throw(INTERP_KERNEL::Exception)
@@ -1175,12 +1175,12 @@ std::size_t MEDFileField1TSStructItem2::getHeapMemorySizeWithoutChildren() const
   return ret;
 }
 
-std::vector<RefCountObject *> MEDFileField1TSStructItem2::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileField1TSStructItem2::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   const DataArrayInt *pfl(_pfl);
   if(pfl)
-    ret.push_back(const_cast<DataArrayInt *>(pfl));
+    ret.push_back(pfl);
   return ret;
 }
 
@@ -1392,11 +1392,11 @@ std::size_t MEDFileField1TSStructItem::getHeapMemorySizeWithoutChildren() const
   return ret;
 }
 
-std::vector<RefCountObject *> MEDFileField1TSStructItem::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileField1TSStructItem::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   for(std::vector< MEDFileField1TSStructItem2 >::const_iterator it=_items.begin();it!=_items.end();it++)
-    ret.push_back(const_cast<MEDFileField1TSStructItem2 *>(&(*it)));
+    ret.push_back(&(*it));
   return ret;
 }
 
@@ -1550,11 +1550,11 @@ std::size_t MEDFileField1TSStruct::getHeapMemorySizeWithoutChildren() const
   return ret;
 }
 
-std::vector<RefCountObject *> MEDFileField1TSStruct::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileField1TSStruct::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   for(std::vector<MEDFileField1TSStructItem>::const_iterator it=_already_checked.begin();it!=_already_checked.end();it++)
-    ret.push_back(const_cast<MEDFileField1TSStructItem *>(&(*it)));
+    ret.push_back(&(*it));
   return ret;
 }
 
@@ -1675,17 +1675,17 @@ std::size_t MEDFileFastCellSupportComparator::getHeapMemorySizeWithoutChildren()
   return ret;
 }
 
-std::vector<RefCountObject *> MEDFileFastCellSupportComparator::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileFastCellSupportComparator::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   const MEDFileMeshStruct *mst(_mesh_comp);
   if(mst)
-    ret.push_back(const_cast<MEDFileMeshStruct *>(mst));
+    ret.push_back(mst);
   for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileField1TSStruct> >::const_iterator it=_f1ts_cmps.begin();it!=_f1ts_cmps.end();it++)
     {
       const MEDFileField1TSStruct *cur(*it);
       if(cur)
-        ret.push_back(const_cast<MEDFileField1TSStruct *>(cur));
+        ret.push_back(cur);
     }
   return ret;
 }
index 9525e403ab3a93e5f2847335ecc83657b047af72..7ffa3f14e1182e566171cb6753a226c53cac617a 100644 (file)
@@ -50,7 +50,7 @@ namespace ParaMEDMEM
   public:
     MEDLOADER_EXPORT static MEDFileMeshStruct *New(const MEDFileMesh *mesh);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     const MEDFileMesh *getTheMesh() const { return _mesh; }
     int getNumberOfNodes() const { return _nb_nodes; }
     int getNumberOfElemsOfGeoType(INTERP_KERNEL::NormalizedCellType t) const throw(INTERP_KERNEL::Exception);
@@ -72,7 +72,7 @@ namespace ParaMEDMEM
   {
   public:
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
   public:
     static MEDMeshMultiLev *New(const MEDFileMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities) throw(INTERP_KERNEL::Exception);
     static MEDMeshMultiLev *New(const MEDFileMesh *m, const std::vector<int>& levs) throw(INTERP_KERNEL::Exception);
@@ -167,7 +167,7 @@ namespace ParaMEDMEM
     std::vector<int> _structure;
   };
 
-  class MEDFileField1TSStructItem2 : public RefCountObject
+  class MEDFileField1TSStructItem2 : public BigMemoryObject
   {
   public:
     MEDFileField1TSStructItem2();
@@ -177,7 +177,7 @@ namespace ParaMEDMEM
     void checkWithMeshStructForGaussPT(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs) throw(INTERP_KERNEL::Exception);
     //
     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
-    MEDLOADER_EXPORT std::vector<RefCountObject *> getDirectChildren() const;
+    MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
     //
     const DataArrayInt *getPfl(const MEDFileFieldGlobsReal *globs) const;
     INTERP_KERNEL::NormalizedCellType getGeo() const { return _geo_type; }
@@ -202,7 +202,7 @@ namespace ParaMEDMEM
     int _nb_of_entity;
   };
 
-  class MEDFileField1TSStructItem : public RefCountObject
+  class MEDFileField1TSStructItem : public BigMemoryObject
   {
   public:
     MEDFileField1TSStructItem() { }
@@ -210,7 +210,7 @@ namespace ParaMEDMEM
     void checkWithMeshStruct(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs) throw(INTERP_KERNEL::Exception);
     bool operator==(const MEDFileField1TSStructItem& other) const throw(INTERP_KERNEL::Exception);
     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
-    MEDLOADER_EXPORT std::vector<RefCountObject *> getDirectChildren() const;
+    MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
     bool isEntityCell() const;
     bool isComputed() const { return _computed; }
     TypeOfField getType() const { return _type; }
@@ -236,7 +236,7 @@ namespace ParaMEDMEM
     static MEDFileField1TSStruct *New(const MEDFileAnyTypeField1TS *ref, MEDFileMeshStruct *mst) throw(INTERP_KERNEL::Exception);
     void checkWithMeshStruct(MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs) throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     bool isEqualConsideringThePast(const MEDFileAnyTypeField1TS *other, const MEDFileMeshStruct *mst) const throw(INTERP_KERNEL::Exception);
     bool isSupportSameAs(const MEDFileAnyTypeField1TS *other, const MEDFileMeshStruct *meshSt) throw(INTERP_KERNEL::Exception);
     bool isCompatibleWithNodesDiscr(const MEDFileAnyTypeField1TS *other, const MEDFileMeshStruct *meshSt) throw(INTERP_KERNEL::Exception);
@@ -259,7 +259,7 @@ namespace ParaMEDMEM
     bool isEqual(const MEDFileAnyTypeFieldMultiTS *other) throw(INTERP_KERNEL::Exception);
     bool isCompatibleWithNodesDiscr(const MEDFileAnyTypeFieldMultiTS *other) throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
   private:
     MEDFileFastCellSupportComparator(const MEDFileMeshStruct *m, const MEDFileAnyTypeFieldMultiTS *ref);
   private:
index d6f11e227fbdc37618a0fb3075cdc5221f2f889c..b3853aa8c09a730a7b7a31d98dd9bb10de0d8644 100644 (file)
@@ -54,9 +54,9 @@ std::size_t MEDFileMesh::getHeapMemorySizeWithoutChildren() const
   return ret;
 }
 
-std::vector<RefCountObject *> MEDFileMesh::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileMesh::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 /*!
@@ -1932,22 +1932,22 @@ std::size_t MEDFileUMesh::getHeapMemorySizeWithoutChildren() const
   return ret;
 }
 
-std::vector<RefCountObject *> MEDFileUMesh::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileUMesh::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret(MEDFileMesh::getDirectChildren());
+  std::vector<const BigMemoryObject *> ret(MEDFileMesh::getDirectChildren());
   if((const DataArrayDouble*)_coords)
-    ret.push_back(const_cast<DataArrayDouble *>((const DataArrayDouble*)_coords));
+    ret.push_back((const DataArrayDouble*)_coords);
   if((const DataArrayInt *)_fam_coords)
-    ret.push_back(const_cast<DataArrayInt *>((const DataArrayInt *)_fam_coords));
+    ret.push_back((const DataArrayInt *)_fam_coords);
   if((const DataArrayInt *)_num_coords)
-    ret.push_back(const_cast<DataArrayInt *>((const DataArrayInt *)_num_coords));
+    ret.push_back((const DataArrayInt *)_num_coords);
   if((const DataArrayInt *)_rev_num_coords)
-    ret.push_back(const_cast<DataArrayInt *>((const DataArrayInt *)_rev_num_coords));
+    ret.push_back((const DataArrayInt *)_rev_num_coords);
   if((const DataArrayAsciiChar *)_name_coords)
-    ret.push_back(const_cast<DataArrayAsciiChar *>((const DataArrayAsciiChar *)_name_coords));
+    ret.push_back((const DataArrayAsciiChar *)_name_coords);
   for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileUMeshSplitL1> >::const_iterator it=_ms.begin();it!=_ms.end();it++)
     if((const MEDFileUMeshSplitL1*) *it)
-      ret.push_back(const_cast<MEDFileUMeshSplitL1 *>((const MEDFileUMeshSplitL1*) *it));
+      ret.push_back((const MEDFileUMeshSplitL1*) *it);
   return ret;
 }
 
@@ -3817,21 +3817,21 @@ std::size_t MEDFileStructuredMesh::getHeapMemorySizeWithoutChildren() const
   return MEDFileMesh::getHeapMemorySizeWithoutChildren();
 }
 
-std::vector<RefCountObject *> MEDFileStructuredMesh::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileStructuredMesh::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret(MEDFileMesh::getDirectChildren());
+  std::vector<const BigMemoryObject *> ret(MEDFileMesh::getDirectChildren());
   if((const DataArrayInt *)_fam_nodes)
-    ret.push_back(const_cast<DataArrayInt *>((const DataArrayInt *)_fam_nodes));
+    ret.push_back((const DataArrayInt *)_fam_nodes);
   if((const DataArrayInt *)_num_nodes)
-    ret.push_back(const_cast<DataArrayInt *>((const DataArrayInt *)_num_nodes));
+    ret.push_back((const DataArrayInt *)_num_nodes);
   if((const DataArrayInt *)_fam_cells)
-    ret.push_back(const_cast<DataArrayInt *>((const DataArrayInt *)_fam_cells));
+    ret.push_back((const DataArrayInt *)_fam_cells);
   if((const DataArrayInt *)_num_cells)
-    ret.push_back(const_cast<DataArrayInt *>((const DataArrayInt *)_num_nodes));
+    ret.push_back((const DataArrayInt *)_num_nodes);
   if((const DataArrayInt *)_rev_num_nodes)
-    ret.push_back(const_cast<DataArrayInt *>((const DataArrayInt *)_rev_num_nodes));
+    ret.push_back((const DataArrayInt *)_rev_num_nodes);
   if((const DataArrayInt *)_rev_num_cells)
-    ret.push_back(const_cast<DataArrayInt *>((const DataArrayInt *)_rev_num_cells));
+    ret.push_back((const DataArrayInt *)_rev_num_cells);
   return ret;
 }
 
@@ -4615,11 +4615,11 @@ std::size_t MEDFileCMesh::getHeapMemorySizeWithoutChildren() const
   return MEDFileStructuredMesh::getHeapMemorySizeWithoutChildren();
 }
 
-std::vector<RefCountObject *> MEDFileCMesh::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileCMesh::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret(MEDFileStructuredMesh::getDirectChildren());
+  std::vector<const BigMemoryObject *> ret(MEDFileStructuredMesh::getDirectChildren());
   if((const MEDCouplingCMesh *)_cmesh)
-    ret.push_back(const_cast<MEDCouplingCMesh *>((const MEDCouplingCMesh *)_cmesh));
+    ret.push_back((const MEDCouplingCMesh *)_cmesh);
   return ret;
 }
 
@@ -4860,11 +4860,11 @@ std::size_t MEDFileCurveLinearMesh::getHeapMemorySizeWithoutChildren() const
   return MEDFileStructuredMesh::getHeapMemorySizeWithoutChildren();
 }
 
-std::vector<RefCountObject *> MEDFileCurveLinearMesh::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileCurveLinearMesh::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret(MEDFileStructuredMesh::getDirectChildren());
+  std::vector<const BigMemoryObject *> ret(MEDFileStructuredMesh::getDirectChildren());
   if((const MEDCouplingCurveLinearMesh *)_clmesh)
-    ret.push_back(const_cast<MEDCouplingCurveLinearMesh *>((const MEDCouplingCurveLinearMesh *)_clmesh));
+    ret.push_back((const MEDCouplingCurveLinearMesh *)_clmesh);
   return ret;
 }
 
@@ -5072,14 +5072,14 @@ std::size_t MEDFileMeshMultiTS::getHeapMemorySizeWithoutChildren() const
   return _mesh_one_ts.capacity()*sizeof(MEDCouplingAutoRefCountObjectPtr<MEDFileMesh>);
 }
 
-std::vector<RefCountObject *> MEDFileMeshMultiTS::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileMeshMultiTS::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> >::const_iterator it=_mesh_one_ts.begin();it!=_mesh_one_ts.end();it++)
     {
       const MEDFileMesh *cur(*it);
       if(cur)
-        ret.push_back(const_cast<MEDFileMesh *>(cur));
+        ret.push_back(cur);
     }
   return ret;
 }
@@ -5357,14 +5357,14 @@ std::size_t MEDFileMeshes::getHeapMemorySizeWithoutChildren() const
   return _meshes.capacity()*(sizeof(MEDCouplingAutoRefCountObjectPtr<MEDFileMeshMultiTS>));
 }
 
-std::vector<RefCountObject *> MEDFileMeshes::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileMeshes::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileMeshMultiTS> >::const_iterator it=_meshes.begin();it!=_meshes.end();it++)
     {
       const MEDFileMeshMultiTS *cur(*it);
       if(cur)
-        ret.push_back(const_cast<MEDFileMeshMultiTS *>(cur));
+        ret.push_back(cur);
     }
   return ret;
 }
index 742ad47c744c062022b655523ac08a10f6b59058..643bac793433fa3f5ee3a08bdd641f25308e5589 100644 (file)
@@ -40,7 +40,7 @@ namespace ParaMEDMEM
     static MEDFileMesh *New(const char *fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     static MEDFileMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     virtual MEDFileMesh *createNewEmpty() const throw(INTERP_KERNEL::Exception) = 0;
     virtual MEDFileMesh *deepCpy() const throw(INTERP_KERNEL::Exception) = 0;
     virtual MEDFileMesh *shallowCpy() const throw(INTERP_KERNEL::Exception) = 0;
@@ -193,7 +193,7 @@ namespace ParaMEDMEM
     static MEDFileUMesh *New(const char *fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     static MEDFileUMesh *New();
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDFileMesh *createNewEmpty() const throw(INTERP_KERNEL::Exception);
     MEDFileMesh *deepCpy() const throw(INTERP_KERNEL::Exception);
     MEDFileMesh *shallowCpy() const throw(INTERP_KERNEL::Exception);
@@ -291,7 +291,7 @@ namespace ParaMEDMEM
     friend class MEDFileMesh;
   public:
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     int getMaxAbsFamilyIdInArrays() const throw(INTERP_KERNEL::Exception);
     int getMaxFamilyIdInArrays() const throw(INTERP_KERNEL::Exception);
     int getMinFamilyIdInArrays() const throw(INTERP_KERNEL::Exception);
@@ -342,7 +342,7 @@ namespace ParaMEDMEM
     static MEDFileCMesh *New(const char *fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     static MEDFileCMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDFileMesh *createNewEmpty() const throw(INTERP_KERNEL::Exception);
     MEDFileMesh *deepCpy() const throw(INTERP_KERNEL::Exception);
     MEDFileMesh *shallowCpy() const throw(INTERP_KERNEL::Exception);
@@ -372,7 +372,7 @@ namespace ParaMEDMEM
     static MEDFileCurveLinearMesh *New(const char *fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     static MEDFileCurveLinearMesh *New(const char *fileName, const char *mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDFileMesh *createNewEmpty() const throw(INTERP_KERNEL::Exception);
     MEDFileMesh *deepCpy() const throw(INTERP_KERNEL::Exception);
     MEDFileMesh *shallowCpy() const throw(INTERP_KERNEL::Exception);
@@ -402,7 +402,7 @@ namespace ParaMEDMEM
     static MEDFileMeshMultiTS *New(const char *fileName, const char *mName) throw(INTERP_KERNEL::Exception);
     MEDFileMeshMultiTS *deepCpy() const throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     std::string getName() const throw(INTERP_KERNEL::Exception);
     void setName(const char *newMeshName) throw(INTERP_KERNEL::Exception);
     bool changeNames(const std::vector< std::pair<std::string,std::string> >& modifTab) throw(INTERP_KERNEL::Exception);
@@ -428,7 +428,7 @@ namespace ParaMEDMEM
     static MEDFileMeshes *New(const char *fileName) throw(INTERP_KERNEL::Exception);
     MEDFileMeshes *deepCpy() const throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     std::string simpleRepr() const;
     void simpleReprWithoutHeader(std::ostream& oss) const;
     void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
index 5bad3f8d9e12d15d2ca97455fa7262388c5bcd67..537ceb64a55052f568ccfd03ef7e73dd6ad151b0 100644 (file)
@@ -45,17 +45,17 @@ std::size_t MEDFileUMeshPerType::getHeapMemorySizeWithoutChildren() const
   return 0;
 }
 
-std::vector<RefCountObject *> MEDFileUMeshPerType::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileUMeshPerType::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   if((const MEDCoupling1GTUMesh *)_m)
-    ret.push_back(const_cast<MEDCoupling1GTUMesh *>((const MEDCoupling1GTUMesh *)_m));
+    ret.push_back((const MEDCoupling1GTUMesh *)_m);
   if((const DataArrayInt *)_num)
-    ret.push_back(const_cast<DataArrayInt *>((const DataArrayInt *)_num));
+    ret.push_back((const DataArrayInt *)_num);
   if((const DataArrayInt *)_fam)
-    ret.push_back(const_cast<DataArrayInt *>((const DataArrayInt *)_fam));
+    ret.push_back((const DataArrayInt *)_fam);
   if((const DataArrayAsciiChar *)_names)
-    ret.push_back(const_cast<DataArrayAsciiChar *>((const DataArrayAsciiChar *)_names));
+    ret.push_back((const DataArrayAsciiChar *)_names);
   return ret;
 }
 
index ee3ccda985683c144ed25aa88023b5533c4662b5..0868cf757cbb2ea0ea4796ef8a5dcc43d677a6a8 100644 (file)
@@ -40,7 +40,7 @@ namespace ParaMEDMEM
     static MEDFileUMeshPerType *New(med_idt fid, const char *mName, int dt, int it, int mdim, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType geoElt2, MEDFileMeshReadSelector *mrs);
     static bool isExisting(med_idt fid, const char *mName, int dt, int it, med_geometry_type geoElt, med_entity_type& whichEntity);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     int getDim() const;
     MEDCoupling1GTUMesh *getMesh() const { return const_cast<MEDCoupling1GTUMesh *>((const MEDCoupling1GTUMesh *)_m); }
     const DataArrayInt *getFam() const { return _fam; }
index ad8c2dae0acd2c359fb31f2975e45188334a2a5a..ef7f11d777e5bcc416b4379d2aab2c119fc2178f 100644 (file)
@@ -45,9 +45,9 @@ std::size_t MEDFileMeshL2::getHeapMemorySizeWithoutChildren() const
   return 0;
 }
 
-std::vector<RefCountObject *> MEDFileMeshL2::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileMeshL2::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 int MEDFileMeshL2::GetMeshIdFromName(med_idt fid, const char *mname, ParaMEDMEM::MEDCouplingMeshType& meshType, int& dt, int& it, std::string& dtunit1) throw(INTERP_KERNEL::Exception)
@@ -567,18 +567,18 @@ std::size_t MEDFileUMeshSplitL1::getHeapMemorySizeWithoutChildren() const
   return 0;
 }
 
-std::vector<RefCountObject *> MEDFileUMeshSplitL1::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileUMeshSplitL1::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
-  ret.push_back(const_cast<MEDFileUMeshAggregateCompute *>(&_m_by_types));
+  std::vector<const BigMemoryObject *> ret;
+  ret.push_back(&_m_by_types);
   if((const DataArrayInt*)_fam)
-    ret.push_back(const_cast<DataArrayInt*>((const DataArrayInt*)_fam));
+    ret.push_back((const DataArrayInt*)_fam);
   if((const DataArrayInt*)_num)
-    ret.push_back(const_cast<DataArrayInt*>((const DataArrayInt*)_num));
+    ret.push_back((const DataArrayInt*)_num);
   if((const DataArrayInt*)_rev_num)
-    ret.push_back(const_cast<DataArrayInt*>((const DataArrayInt*)_rev_num));
+    ret.push_back((const DataArrayInt*)_rev_num);
   if((const DataArrayAsciiChar*)_names)
-    ret.push_back(const_cast<DataArrayAsciiChar*>((const DataArrayAsciiChar*)_names));
+    ret.push_back((const DataArrayAsciiChar*)_names);
   return ret;
 }
 
@@ -1078,18 +1078,18 @@ std::size_t MEDFileUMeshAggregateCompute::getHeapMemorySizeWithoutChildren() con
   return ret;
 }
 
-std::vector<RefCountObject *> MEDFileUMeshAggregateCompute::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileUMeshAggregateCompute::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCoupling1GTUMesh> >::const_iterator it=_m_parts.begin();it!=_m_parts.end();it++)
     {
       const MEDCoupling1GTUMesh *cur(*it);
       if(cur)
-        ret.push_back(const_cast<MEDCoupling1GTUMesh *>(cur));
+        ret.push_back(cur);
     }
   const MEDCouplingUMesh *m(_m);
   if(m)
-    ret.push_back(const_cast<MEDCouplingUMesh *>(m));
+    ret.push_back(m);
   return ret;
 }
 
index a44312b408cd0b0315259cb71eddeea7f491125c..90567eab083b81b0f1e4794a674fc4745f28ebdf 100644 (file)
@@ -43,7 +43,7 @@ namespace ParaMEDMEM
   public:
     MEDFileMeshL2();
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     const char *getName() const { return _name.getReprForWrite(); }
     const char *getDescription() const { return _description.getReprForWrite(); }
     const char *getUnivName() const { return _univ_name.getReprForWrite(); }
@@ -137,7 +137,7 @@ namespace ParaMEDMEM
     mutable MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> _m;
   };
 
-  class MEDFileUMeshAggregateCompute : public RefCountObject
+  class MEDFileUMeshAggregateCompute : public BigMemoryObject
   {
   public:
     MEDFileUMeshAggregateCompute();
@@ -149,7 +149,7 @@ namespace ParaMEDMEM
     MEDCoupling1GTUMesh *getPartWithoutComputation(INTERP_KERNEL::NormalizedCellType gt) const throw(INTERP_KERNEL::Exception);
     std::size_t getTimeOfThis() const;
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDFileUMeshAggregateCompute deepCpy(DataArrayDouble *coords) const;
     bool isEqual(const MEDFileUMeshAggregateCompute& other, double eps, std::string& what) const;
     void clearNonDiscrAttributes() const;
@@ -179,7 +179,7 @@ namespace ParaMEDMEM
     MEDFileUMeshSplitL1(MEDCouplingUMesh *m);
     MEDFileUMeshSplitL1(MEDCouplingUMesh *m, bool newOrOld);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDFileUMeshSplitL1 *deepCpy(DataArrayDouble *coords) const;
     void setCoords(DataArrayDouble *coords) throw(INTERP_KERNEL::Exception);
     bool isEqual(const MEDFileUMeshSplitL1 *other, double eps, std::string& what) const;
index ad675d51fff4622b1429fc06caad847b5b8d0dce..c2975f881592a485e2695836160994a77107e455 100644 (file)
@@ -72,9 +72,9 @@ std::size_t MEDFileParameterDouble1TSWTI::getHeapMemorySizeWithoutChildren() con
   return sizeof(MEDFileParameterDouble1TSWTI);
 }
 
-std::vector<RefCountObject *> MEDFileParameterDouble1TSWTI::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileParameterDouble1TSWTI::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 std::string MEDFileParameterDouble1TSWTI::simpleRepr() const
@@ -350,9 +350,9 @@ std::size_t MEDFileParameterDouble1TS::getHeapMemorySizeWithoutChildren() const
   return getHeapMemSizeOfStrings()+sizeof(MEDFileParameterDouble1TS);
 }
 
-std::vector<RefCountObject *> MEDFileParameterDouble1TS::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileParameterDouble1TS::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 void MEDFileParameterDouble1TS::write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception)
@@ -486,14 +486,14 @@ std::size_t MEDFileParameterMultiTS::getHeapMemorySizeWithoutChildren() const
   return ret;
 }
 
-std::vector<RefCountObject *> MEDFileParameterMultiTS::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileParameterMultiTS::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileParameter1TS> >::const_iterator it=_param_per_ts.begin();it!=_param_per_ts.end();it++)
     {
       const MEDFileParameter1TS *elt(*it);
       if(elt)
-        ret.push_back(const_cast<MEDFileParameter1TS *>(elt));
+        ret.push_back(elt);
     }
   return ret;
 }
@@ -737,14 +737,14 @@ std::size_t MEDFileParameters::getHeapMemorySizeWithoutChildren() const
   return ret;
 }
 
-std::vector<RefCountObject *> MEDFileParameters::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileParameters::getDirectChildren() const
 {
-  std::vector<RefCountObject *> ret;
+  std::vector<const BigMemoryObject *> ret;
   for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileParameterMultiTS> >::const_iterator it=_params.begin();it!=_params.end();it++)
     {
       const MEDFileParameterMultiTS *elt(*it);
       if(elt)
-        ret.push_back(const_cast<MEDFileParameterMultiTS *>(elt));
+        ret.push_back(elt);
     }
   return ret;
 }
index 21240cb0b228a83bcb7b140b0e9035285ff040de..6e975428e44c17edcb38d3c04993d91557d2573f 100644 (file)
@@ -63,7 +63,7 @@ namespace ParaMEDMEM
     double getValue() const throw(INTERP_KERNEL::Exception) { return _arr; }
     bool isEqual(const MEDFileParameter1TS *other, double eps, std::string& what) const;
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     void readValue(med_idt fid, const std::string& name) throw(INTERP_KERNEL::Exception);
     std::string simpleRepr() const;
   protected:
@@ -106,7 +106,7 @@ namespace ParaMEDMEM
     virtual bool isEqual(const MEDFileParameter1TS *other, double eps, std::string& what) const;
     virtual std::string simpleRepr() const;
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     void setName(const char *name) throw(INTERP_KERNEL::Exception) { _name=name; }
     std::string getName() const throw(INTERP_KERNEL::Exception) { return _name; }
     void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
@@ -126,7 +126,7 @@ namespace ParaMEDMEM
     std::string getName() const { return _name; }
     void setName(const char *name) { _name=name; }
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDFileParameterMultiTS *deepCpy() const throw(INTERP_KERNEL::Exception);
     bool isEqual(const MEDFileParameterMultiTS *other, double eps, std::string& what) const;
     void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
@@ -157,7 +157,7 @@ namespace ParaMEDMEM
     static MEDFileParameters *New();
     static MEDFileParameters *New(const char *fileName) throw(INTERP_KERNEL::Exception);
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     MEDFileParameters *deepCpy() const throw(INTERP_KERNEL::Exception);
     bool isEqual(const MEDFileParameters *other, double eps, std::string& what) const;
     void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
index 65093499cbb3d0acf9e63ad343c034e42ffe7b58..4723db57e79c740e25eccef4e02bf9e6b3ba1166 100644 (file)
@@ -86,9 +86,9 @@ std::size_t SauvReader::getHeapMemorySizeWithoutChildren() const
   return 0;
 }
 
-std::vector<RefCountObject *> SauvReader::getDirectChildren() const
+std::vector<const BigMemoryObject *> SauvReader::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 //================================================================================
index 01b87d08ef90b80d58b8a50adb46a9fdd197ab0a..d9c7b6379560834658c52a2e8358569fb13481e6 100644 (file)
@@ -52,7 +52,7 @@ class MEDLOADER_EXPORT SauvReader : public ParaMEDMEM::RefCountObject
 
  private:
   std::size_t getHeapMemorySizeWithoutChildren() const;
-  std::vector<RefCountObject *> getDirectChildren() const;
+  std::vector<const BigMemoryObject *> getDirectChildren() const;
   void readRecord2();
   void readRecord4();
   void readRecord7();
index 25bec6d3b07aea407944ccc0a5c1e52961a2b068..7804ba44a501ac166e9a1dc4a4471038367b77ee 100644 (file)
@@ -111,7 +111,7 @@ namespace SauvUtilities
     virtual std::string getName() const = 0;
   protected:
     std::size_t getHeapMemorySizeWithoutChildren() const { return 0; }
-    std::vector<RefCountObject *> getDirectChildren() const { return std::vector<RefCountObject *>(); }
+    std::vector<const BigMemoryObject *> getDirectChildren() const { return std::vector<const BigMemoryObject *>(); }
   protected:
     std::string _fileName, _curLocale;
     int _iRead, _nbToRead;
index 908f7a5043ddd75c7992345485c5a318e6927484..0ff5777aa3a41b4f95905b4eee99bcbdb5cf38c8 100644 (file)
@@ -228,9 +228,9 @@ std::size_t SauvWriter::getHeapMemorySizeWithoutChildren() const
   return 0;
 }
 
-std::vector<RefCountObject *> SauvWriter::getDirectChildren() const
+std::vector<const BigMemoryObject *> SauvWriter::getDirectChildren() const
 {
-  return std::vector<RefCountObject *>();
+  return std::vector<const BigMemoryObject *>();
 }
 
 //================================================================================
index 7f3b13fdeefe27f7dcf4d7055e31ea34ab6fa318..63a65b4536a1e10db1b209d1c08471dec32bc80e 100644 (file)
@@ -52,7 +52,7 @@ namespace ParaMEDMEM
 
   private:
     std::size_t getHeapMemorySizeWithoutChildren() const;
-    std::vector<RefCountObject *> getDirectChildren() const;
+    std::vector<const BigMemoryObject *> getDirectChildren() const;
     /*!
      * \brief Class representing a GIBI sub-mesh (described in the pile 1 of the SAUVE file).
      * It stands for a named med sub-mesh (family, etc) and contains either cell IDs or other sub-meshes.