From: abn Date: Fri, 15 Jan 2016 14:31:50 +0000 (+0100) Subject: Covariance: forgot the most important one deepCpy() !! X-Git-Tag: V8_0_0b1~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aa3897d6fc893f5dee56acda257c646b503abda9;p=tools%2Fmedcoupling.git Covariance: forgot the most important one deepCpy() !! --- diff --git a/src/MEDCoupling/MEDCouplingMesh.hxx b/src/MEDCoupling/MEDCouplingMesh.hxx index b748be981..817b8d0cd 100644 --- a/src/MEDCoupling/MEDCouplingMesh.hxx +++ b/src/MEDCoupling/MEDCouplingMesh.hxx @@ -64,10 +64,11 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT void setTime(double val, int iteration, int order) { _time=val; _iteration=iteration; _order=order; } MEDCOUPLING_EXPORT void setTimeUnit(const std::string& unit) { _time_unit=unit; } MEDCOUPLING_EXPORT std::string getTimeUnit() const { return _time_unit; } - MEDCOUPLING_EXPORT virtual MEDCouplingMesh *deepCpy() const = 0; - MEDCOUPLING_EXPORT virtual MEDCouplingMesh *clone(bool recDeepCpy) const = 0; MEDCOUPLING_EXPORT virtual MEDCouplingMeshType getType() const = 0; MEDCOUPLING_EXPORT bool isStructured() const; + // Copy methods + MEDCOUPLING_EXPORT virtual MEDCouplingMesh *deepCpy() const = 0; + MEDCOUPLING_EXPORT virtual MEDCouplingMesh *clone(bool recDeepCpy) const = 0; MEDCOUPLING_EXPORT virtual void copyTinyStringsFrom(const MEDCouplingMesh *other); MEDCOUPLING_EXPORT virtual void copyTinyInfoFrom(const MEDCouplingMesh *other); // comparison methods diff --git a/src/MEDCoupling/MEDCouplingUMesh.cxx b/src/MEDCoupling/MEDCouplingUMesh.cxx index 7a0926ef3..a9c55c697 100644 --- a/src/MEDCoupling/MEDCouplingUMesh.cxx +++ b/src/MEDCoupling/MEDCouplingUMesh.cxx @@ -71,21 +71,22 @@ MEDCouplingUMesh *MEDCouplingUMesh::New(const std::string& meshName, int meshDim } /*! - * Returns a new MEDCouplingMesh which is a full copy of \a this one. No data is shared + * Returns a new MEDCouplingUMesh which is a full copy of \a this one. No data is shared * between \a this and the new mesh. - * \return MEDCouplingMesh * - a new instance of MEDCouplingMesh. The caller is to + * \return MEDCouplingUMesh * - a new instance of MEDCouplingMesh. The caller is to * delete this mesh using decrRef() as it is no more needed. */ -MEDCouplingMesh *MEDCouplingUMesh::deepCpy() const +MEDCouplingUMesh *MEDCouplingUMesh::deepCpy() const { return clone(true); } + /*! - * Returns a new MEDCouplingMesh which is a copy of \a this one. + * Returns a new MEDCouplingUMesh which is a copy of \a this one. * \param [in] recDeepCpy - if \a true, the copy is deep, else all data arrays of \a * this mesh are shared by the new mesh. - * \return MEDCouplingMesh * - a new instance of MEDCouplingMesh. The caller is to + * \return MEDCouplingUMesh * - a new instance of MEDCouplingMesh. The caller is to * delete this mesh using decrRef() as it is no more needed. */ MEDCouplingUMesh *MEDCouplingUMesh::clone(bool recDeepCpy) const diff --git a/src/MEDCoupling/MEDCouplingUMesh.hxx b/src/MEDCoupling/MEDCouplingUMesh.hxx index 4a06f26f3..5e81aff3a 100644 --- a/src/MEDCoupling/MEDCouplingUMesh.hxx +++ b/src/MEDCoupling/MEDCouplingUMesh.hxx @@ -42,9 +42,11 @@ namespace ParaMEDMEM public: MEDCOUPLING_EXPORT static MEDCouplingUMesh *New(); MEDCOUPLING_EXPORT static MEDCouplingUMesh *New(const std::string& meshName, int meshDim); - MEDCOUPLING_EXPORT MEDCouplingMesh *deepCpy() const; + // Copy methods + MEDCOUPLING_EXPORT MEDCouplingUMesh *deepCpy() const;; MEDCOUPLING_EXPORT MEDCouplingUMesh *clone(bool recDeepCpy) const; MEDCOUPLING_EXPORT MEDCouplingUMesh *deepCpyConnectivityOnly() const; + MEDCOUPLING_EXPORT void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other); MEDCOUPLING_EXPORT void updateTime() const; MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; diff --git a/v8_work/TODO.txt b/v8_work/TODO.txt index b7cc5c0c0..f2adaa4fd 100644 --- a/v8_work/TODO.txt +++ b/v8_work/TODO.txt @@ -4,6 +4,7 @@ TODO for V8 Covariance fixes [DONE] ================ + MEDCouplingUMesh + deepCpy ! deepCpyConnectivityOnly mergeMyselfWithOnSameCoords buildPartOfMySelf @@ -53,6 +54,7 @@ Interpolation All classes ----------- deepCpy / deepCopy + performCpy / performCopyOrIncrRef Auto-pointeur ------------- @@ -75,6 +77,7 @@ MEDCouplingPointSet renumberNodes2 / renumberNodesCenter buildPartOfMySelf2 / buildPartOfMySelfSlice buildPartOfMySelfKeepCoords2 / buildPartOfMySelfKeepCoordsSlice + deepCpyConnectivityOnly / deepCopyConnectivityOnly MEDCoupling1DGTUMesh -------------------- @@ -93,6 +96,7 @@ MEDCouplingUMesh ExtractFromIndexedArrays2 / ExtractFromIndexedArraysSlice SetPartOfIndexedArrays2 / SetPartOfIndexedArraysSlice SetPartOfIndexedArraysSameIdx2 / SetPartOfIndexedArraysSameIdxSlice + deepCpyConnectivityOnly / deepCopyConnectivityOnly DataArray ---------