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)
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;
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
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;
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;
}
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;
}
// 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;
// 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;
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;
}
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);
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;
}
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);
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
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)
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;
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; }
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;
}
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;
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;
}
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;
return 0;
}
-std::vector<RefCountObject *> MEDCouplingFieldDiscretization::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingFieldDiscretization::getDirectChildren() const
{
- return std::vector<RefCountObject *>();
+ return std::vector<const BigMemoryObject *>();
}
/*!
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;
}
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;
~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;
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;
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;
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 *>();
}
/*!
{
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);
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;
}
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,
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;
}
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);
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);
}
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());
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)
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()
{
}
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
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;
}
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;
}
class DataArrayDouble;
class TimeLabel;
- class MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization : public TimeLabel
+ class MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization : public TimeLabel, public BigMemoryObject
{
protected:
MEDCouplingTimeDiscretization();
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(); }
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);
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;
}
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;
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();
};
}
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;
}
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;
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
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)
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
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);
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);
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);
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);
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);
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);
//! 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;
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);
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);
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);
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)
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)
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;
}
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;
}
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;
}
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;
}
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);
{
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);
std::vector<int> _structure;
};
- class MEDFileField1TSStructItem2 : public RefCountObject
+ class MEDFileField1TSStructItem2 : public BigMemoryObject
{
public:
MEDFileField1TSStructItem2();
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; }
int _nb_of_entity;
};
- class MEDFileField1TSStructItem : public RefCountObject
+ class MEDFileField1TSStructItem : public BigMemoryObject
{
public:
MEDFileField1TSStructItem() { }
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; }
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);
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:
return ret;
}
-std::vector<RefCountObject *> MEDFileMesh::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileMesh::getDirectChildren() const
{
- return std::vector<RefCountObject *>();
+ return std::vector<const BigMemoryObject *>();
}
/*!
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
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);
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);
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);
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);
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);
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);
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;
}
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; }
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)
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;
}
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;
}
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(); }
mutable MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> _m;
};
- class MEDFileUMeshAggregateCompute : public RefCountObject
+ class MEDFileUMeshAggregateCompute : public BigMemoryObject
{
public:
MEDFileUMeshAggregateCompute();
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;
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;
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
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)
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;
}
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;
}
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:
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);
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);
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);
return 0;
}
-std::vector<RefCountObject *> SauvReader::getDirectChildren() const
+std::vector<const BigMemoryObject *> SauvReader::getDirectChildren() const
{
- return std::vector<RefCountObject *>();
+ return std::vector<const BigMemoryObject *>();
}
//================================================================================
private:
std::size_t getHeapMemorySizeWithoutChildren() const;
- std::vector<RefCountObject *> getDirectChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildren() const;
void readRecord2();
void readRecord4();
void readRecord7();
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;
return 0;
}
-std::vector<RefCountObject *> SauvWriter::getDirectChildren() const
+std::vector<const BigMemoryObject *> SauvWriter::getDirectChildren() const
{
- return std::vector<RefCountObject *>();
+ return std::vector<const BigMemoryObject *>();
}
//================================================================================
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.