From: abn Date: Mon, 18 Jan 2016 08:47:10 +0000 (+0100) Subject: Covariance: last fixes. X-Git-Tag: V8_0_0b1~25 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5a8bd41d7ac218032b5690eff7e9f0845934142e;p=tools%2Fmedcoupling.git Covariance: last fixes. --- diff --git a/src/MEDCoupling/MEDCoupling1GTUMesh.cxx b/src/MEDCoupling/MEDCoupling1GTUMesh.cxx index cea42c447..17dfb5d66 100644 --- a/src/MEDCoupling/MEDCoupling1GTUMesh.cxx +++ b/src/MEDCoupling/MEDCoupling1GTUMesh.cxx @@ -550,10 +550,10 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::clone(bool recDeepCpy) const * This method behaves mostly like MEDCoupling1SGTUMesh::deepCpy method, except that only nodal connectivity arrays are deeply copied. * The coordinates are shared between \a this and the returned instance. * - * \return MEDCouplingUMesh * - A new object instance holding the copy of \a this (deep for connectivity, shallow for coordiantes) + * \return MEDCoupling1SGTUMesh * - A new object instance holding the copy of \a this (deep for connectivity, shallow for coordiantes) * \sa MEDCoupling1SGTUMesh::deepCpy */ -MEDCouplingPointSet *MEDCoupling1SGTUMesh::deepCpyConnectivityOnly() const +MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::deepCpyConnectivityOnly() const { checkCoherency(); MEDCouplingAutoRefCountObjectPtr ret(clone(false)); @@ -592,7 +592,7 @@ std::vector MEDCoupling1SGTUMesh::getDirectChildrenWith return ret; } -MEDCouplingMesh *MEDCoupling1SGTUMesh::deepCpy() const +MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::deepCpy() const { return clone(true); } @@ -2185,10 +2185,10 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::clone(bool recDeepCpy) const * This method behaves mostly like MEDCoupling1DGTUMesh::deepCpy method, except that only nodal connectivity arrays are deeply copied. * The coordinates are shared between \a this and the returned instance. * - * \return MEDCouplingUMesh * - A new object instance holding the copy of \a this (deep for connectivity, shallow for coordiantes) + * \return MEDCoupling1DGTUMesh * - A new object instance holding the copy of \a this (deep for connectivity, shallow for coordiantes) * \sa MEDCoupling1DGTUMesh::deepCpy */ -MEDCouplingPointSet *MEDCoupling1DGTUMesh::deepCpyConnectivityOnly() const +MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::deepCpyConnectivityOnly() const { checkCoherency(); MEDCouplingAutoRefCountObjectPtr ret(clone(false)); @@ -2221,7 +2221,7 @@ std::vector MEDCoupling1DGTUMesh::getDirectChildrenWith return ret; } -MEDCouplingMesh *MEDCoupling1DGTUMesh::deepCpy() const +MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::deepCpy() const { return clone(true); } diff --git a/src/MEDCoupling/MEDCoupling1GTUMesh.hxx b/src/MEDCoupling/MEDCoupling1GTUMesh.hxx index 9928bc48f..106a0c6bd 100644 --- a/src/MEDCoupling/MEDCoupling1GTUMesh.hxx +++ b/src/MEDCoupling/MEDCoupling1GTUMesh.hxx @@ -91,15 +91,17 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT static MEDCoupling1SGTUMesh *New(const MEDCouplingUMesh *m); //! useless constructor only for CORBA -> not swigged MEDCOUPLING_EXPORT static MEDCoupling1SGTUMesh *New(); + // Copy methods MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *clone(bool recDeepCpy) const; - MEDCOUPLING_EXPORT MEDCouplingPointSet *deepCpyConnectivityOnly() const; + MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *deepCpy() const; + MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *deepCpyConnectivityOnly() const; // overload of TimeLabel and RefCountObject MEDCOUPLING_EXPORT void updateTime() const; MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; MEDCOUPLING_EXPORT std::vector getDirectChildrenWithNull() const; // overload of MEDCouplingMesh MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return SINGLE_STATIC_GEO_TYPE_UNSTRUCTURED; } - MEDCOUPLING_EXPORT MEDCouplingMesh *deepCpy() const; + MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const; MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const; MEDCOUPLING_EXPORT void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const; @@ -185,15 +187,17 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *New(const MEDCouplingUMesh *m); //! useless constructor only for CORBA -> not swigged MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *New(); + // Copy methods MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh *clone(bool recDeepCpy) const; - MEDCOUPLING_EXPORT MEDCouplingPointSet *deepCpyConnectivityOnly() const; + MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh *deepCpy() const; + MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh *deepCpyConnectivityOnly() const; + // overload of TimeLabel and RefCountObject MEDCOUPLING_EXPORT void updateTime() const; MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; MEDCOUPLING_EXPORT std::vector getDirectChildrenWithNull() const; // overload of MEDCouplingMesh MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return SINGLE_DYNAMIC_GEO_TYPE_UNSTRUCTURED; } - MEDCOUPLING_EXPORT MEDCouplingMesh *deepCpy() const; MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const; MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const; MEDCOUPLING_EXPORT void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const; diff --git a/src/MEDCoupling/MEDCouplingCMesh.cxx b/src/MEDCoupling/MEDCouplingCMesh.cxx index c0771916e..0e7d7f66e 100644 --- a/src/MEDCoupling/MEDCouplingCMesh.cxx +++ b/src/MEDCoupling/MEDCouplingCMesh.cxx @@ -89,7 +89,7 @@ MEDCouplingCMesh *MEDCouplingCMesh::New(const std::string& meshName) return ret; } -MEDCouplingMesh *MEDCouplingCMesh::deepCpy() const +MEDCouplingCMesh *MEDCouplingCMesh::deepCpy() const { return clone(true); } diff --git a/src/MEDCoupling/MEDCouplingCMesh.hxx b/src/MEDCoupling/MEDCouplingCMesh.hxx index e5359b6db..ec77efdd0 100644 --- a/src/MEDCoupling/MEDCouplingCMesh.hxx +++ b/src/MEDCoupling/MEDCouplingCMesh.hxx @@ -33,7 +33,7 @@ namespace ParaMEDMEM public: MEDCOUPLING_EXPORT static MEDCouplingCMesh *New(); MEDCOUPLING_EXPORT static MEDCouplingCMesh *New(const std::string& meshName); - MEDCOUPLING_EXPORT MEDCouplingMesh *deepCpy() const; + MEDCOUPLING_EXPORT MEDCouplingCMesh *deepCpy() const; MEDCOUPLING_EXPORT MEDCouplingCMesh *clone(bool recDeepCpy) const; MEDCOUPLING_EXPORT MEDCouplingCurveLinearMesh *buildCurveLinear() const; MEDCOUPLING_EXPORT void updateTime() const; diff --git a/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx b/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx index 601ea910d..abdd6fedd 100644 --- a/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx +++ b/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx @@ -64,7 +64,7 @@ MEDCouplingCurveLinearMesh *MEDCouplingCurveLinearMesh::New(const std::string& m return ret; } -MEDCouplingMesh *MEDCouplingCurveLinearMesh::deepCpy() const +MEDCouplingCurveLinearMesh *MEDCouplingCurveLinearMesh::deepCpy() const { return clone(true); } diff --git a/src/MEDCoupling/MEDCouplingCurveLinearMesh.hxx b/src/MEDCoupling/MEDCouplingCurveLinearMesh.hxx index 341075947..9f7fbad51 100644 --- a/src/MEDCoupling/MEDCouplingCurveLinearMesh.hxx +++ b/src/MEDCoupling/MEDCouplingCurveLinearMesh.hxx @@ -32,7 +32,7 @@ namespace ParaMEDMEM public: MEDCOUPLING_EXPORT static MEDCouplingCurveLinearMesh *New(); MEDCOUPLING_EXPORT static MEDCouplingCurveLinearMesh *New(const std::string& meshName); - MEDCOUPLING_EXPORT MEDCouplingMesh *deepCpy() const; + MEDCOUPLING_EXPORT MEDCouplingCurveLinearMesh *deepCpy() const; MEDCOUPLING_EXPORT MEDCouplingCurveLinearMesh *clone(bool recDeepCpy) const; MEDCOUPLING_EXPORT void updateTime() const; MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; diff --git a/src/ParaMEDMEM/MPIProcessorGroup.cxx b/src/ParaMEDMEM/MPIProcessorGroup.cxx index 3bf01b69d..0114877b4 100644 --- a/src/ParaMEDMEM/MPIProcessorGroup.cxx +++ b/src/ParaMEDMEM/MPIProcessorGroup.cxx @@ -218,7 +218,7 @@ namespace ParaMEDMEM } - ProcessorGroup *MPIProcessorGroup::deepCpy() const + MPIProcessorGroup *MPIProcessorGroup::deepCpy() const { return new MPIProcessorGroup(*this); } diff --git a/src/ParaMEDMEM/MPIProcessorGroup.hxx b/src/ParaMEDMEM/MPIProcessorGroup.hxx index 7c39ed26d..b51a7adea 100644 --- a/src/ParaMEDMEM/MPIProcessorGroup.hxx +++ b/src/ParaMEDMEM/MPIProcessorGroup.hxx @@ -38,7 +38,7 @@ namespace ParaMEDMEM MPIProcessorGroup(const CommInterface& interface,int pstart, int pend, const MPI_Comm& world_comm=MPI_COMM_WORLD); MPIProcessorGroup(const MPIProcessorGroup& other); virtual ~MPIProcessorGroup(); - virtual ProcessorGroup *deepCpy() const; + virtual MPIProcessorGroup *deepCpy() const; virtual ProcessorGroup* fuse (const ProcessorGroup&) const; void intersect (ProcessorGroup&) { } int myRank() const; diff --git a/v8_work/TODO.txt b/v8_work/TODO.txt index f2adaa4fd..55a1ff869 100644 --- a/v8_work/TODO.txt +++ b/v8_work/TODO.txt @@ -28,7 +28,7 @@ Various simplifications + tessellate2D et tessellate2DCurve: à merger en un seul tessellate2D + rename file MEDCouplingNatureOfFieldEnum into MEDCouplingNatureOfFieldEnum.hxx -Inheritance fix +Inheritance fix (for 8.1) =============== + move up in all classes deepCpy(), shallowCpy(), clone() @@ -68,8 +68,8 @@ MEDCouplingMesh --------------- getBarycenterAndOwner / computeBarycenter computeIsoBarycenterOfNodesPerCell / computeCenterOfMass - checkCoherency / checkConsistencyLight - checkCoherency1 / checkConsistency + checkCoherency / checkCoherencyLight + checkCoherency1 / checkCoherency MEDCouplingPointSet ------------------- diff --git a/v8_work/medcoup7to8.py b/v8_work/medcoup7to8.py index 6b64d31f1..9547ce562 100755 --- a/v8_work/medcoup7to8.py +++ b/v8_work/medcoup7to8.py @@ -34,7 +34,6 @@ REPLACEMENTS = [("RevIntegral", "IntensiveConservation"), ("ConservativeVolumic", "IntensiveMaximum"), ("IntegralGlobConstraint", "ExtensiveConservation"), ("Integral", "ExtensiveMaximum"), - ("MEDCouplingNatureOfFieldEnum", "MEDCouplingNatureOfFieldEnum.hxx"), ("MEDCouplingAutoRefCountObjectPtr", "MCAuto"), ("deepCpy", "deepCopy") ]