From b89e8e882b8a9b1e34cd3e202a3570196abfea9f Mon Sep 17 00:00:00 2001 From: ageay Date: Wed, 24 Jul 2013 12:49:04 +0000 Subject: [PATCH] Target MEDReader --- src/MEDCoupling/MEDCouplingMemArray.hxx | 6 +++--- src/MEDCoupling/MEDCouplingMemArrayChar.cxx | 4 ++-- src/MEDCoupling/MEDCouplingStructuredMesh.cxx | 3 ++- src/MEDCoupling_Swig/MEDCouplingCommon.i | 4 +--- src/MEDCoupling_Swig/MEDCouplingMemArray.i | 4 +--- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/MEDCoupling/MEDCouplingMemArray.hxx b/src/MEDCoupling/MEDCouplingMemArray.hxx index 7a8a03013..a789c9631 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.hxx +++ b/src/MEDCoupling/MEDCouplingMemArray.hxx @@ -134,6 +134,7 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT std::string getUnitOnComponent(int i) const throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT void setInfoOnComponent(int i, const char *info) throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT int getNumberOfComponents() const { return (int)_info_on_compo.size(); } + MEDCOUPLING_EXPORT virtual DataArray *deepCpy() const throw(INTERP_KERNEL::Exception) = 0; MEDCOUPLING_EXPORT virtual bool isAllocated() const throw(INTERP_KERNEL::Exception) = 0; MEDCOUPLING_EXPORT virtual void checkAllocated() const throw(INTERP_KERNEL::Exception) = 0; MEDCOUPLING_EXPORT virtual void desallocate() throw(INTERP_KERNEL::Exception) = 0; @@ -640,7 +641,6 @@ namespace ParaMEDMEM { public: MEDCOUPLING_EXPORT virtual DataArrayChar *buildEmptySpecializedDAChar() const throw(INTERP_KERNEL::Exception) = 0; - MEDCOUPLING_EXPORT virtual DataArrayChar *deepCpy() const = 0; MEDCOUPLING_EXPORT bool isAllocated() const throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT void checkAllocated() const throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT void desallocate() throw(INTERP_KERNEL::Exception); @@ -746,7 +746,7 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT static DataArrayByte *New(); MEDCOUPLING_EXPORT DataArrayChar *buildEmptySpecializedDAChar() const throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT DataArrayByteIterator *iterator(); - MEDCOUPLING_EXPORT DataArrayByte *deepCpy() const; + MEDCOUPLING_EXPORT DataArrayByte *deepCpy() const throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT DataArrayByte *performCpy(bool deepCpy) const; MEDCOUPLING_EXPORT char byteValue() const throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT void reprStream(std::ostream& stream) const throw(INTERP_KERNEL::Exception); @@ -803,7 +803,7 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT static DataArrayAsciiChar *New(const std::vector& vst, char defaultChar) throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT DataArrayChar *buildEmptySpecializedDAChar() const throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT DataArrayAsciiCharIterator *iterator(); - MEDCOUPLING_EXPORT DataArrayAsciiChar *deepCpy() const; + MEDCOUPLING_EXPORT DataArrayAsciiChar *deepCpy() const throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT DataArrayAsciiChar *performCpy(bool deepCpy) const; MEDCOUPLING_EXPORT char asciiCharValue() const throw(INTERP_KERNEL::Exception); MEDCOUPLING_EXPORT void reprStream(std::ostream& stream) const throw(INTERP_KERNEL::Exception); diff --git a/src/MEDCoupling/MEDCouplingMemArrayChar.cxx b/src/MEDCoupling/MEDCouplingMemArrayChar.cxx index d3872cf21..c718b3a51 100644 --- a/src/MEDCoupling/MEDCouplingMemArrayChar.cxx +++ b/src/MEDCoupling/MEDCouplingMemArrayChar.cxx @@ -1965,7 +1965,7 @@ DataArrayByteIterator *DataArrayByte::iterator() * \ref MEDCouplingArrayBasicsCopyDeep. * \return DataArrayByte * - a new instance of DataArrayByte. */ -DataArrayByte *DataArrayByte::deepCpy() const +DataArrayByte *DataArrayByte::deepCpy() const throw(INTERP_KERNEL::Exception) { return new DataArrayByte(*this); } @@ -2298,7 +2298,7 @@ DataArrayAsciiCharIterator *DataArrayAsciiChar::iterator() * \ref MEDCouplingArrayBasicsCopyDeep. * \return DataArrayAsciiChar * - a new instance of DataArrayAsciiChar. */ -DataArrayAsciiChar *DataArrayAsciiChar::deepCpy() const +DataArrayAsciiChar *DataArrayAsciiChar::deepCpy() const throw(INTERP_KERNEL::Exception) { return new DataArrayAsciiChar(*this); } diff --git a/src/MEDCoupling/MEDCouplingStructuredMesh.cxx b/src/MEDCoupling/MEDCouplingStructuredMesh.cxx index 2da06d22b..91ba40dd9 100644 --- a/src/MEDCoupling/MEDCouplingStructuredMesh.cxx +++ b/src/MEDCoupling/MEDCouplingStructuredMesh.cxx @@ -282,7 +282,8 @@ MEDCoupling1SGTUMesh *MEDCouplingStructuredMesh::build1SGTUnstructured() const t */ MEDCouplingUMesh *MEDCouplingStructuredMesh::buildUnstructured() const throw(INTERP_KERNEL::Exception) { - return build1SGTUnstructured()->buildUnstructured(); + MEDCouplingAutoRefCountObjectPtr ret0(build1SGTUnstructured()); + return ret0->buildUnstructured(); } /*! diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index 9cdf32e5c..bb82ad21c 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -222,10 +222,10 @@ using namespace INTERP_KERNEL; %newobject ParaMEDMEM::MEDCouplingFieldDouble::getValueOnMulti; %newobject ParaMEDMEM::MEDCouplingFieldTemplate::New; %newobject ParaMEDMEM::DataArray::selectByTupleRanges; +%newobject ParaMEDMEM::DataArray::deepCpy; %newobject ParaMEDMEM::DataArrayInt::New; %newobject ParaMEDMEM::DataArrayInt::__iter__; %newobject ParaMEDMEM::DataArrayInt::convertToDblArr; -%newobject ParaMEDMEM::DataArrayInt::deepCpy; %newobject ParaMEDMEM::DataArrayInt::performCpy; %newobject ParaMEDMEM::DataArrayInt::substr; %newobject ParaMEDMEM::DataArrayInt::changeNbOfComponents; @@ -288,7 +288,6 @@ using namespace INTERP_KERNEL; %newobject ParaMEDMEM::DataArrayInt::__pow__; %newobject ParaMEDMEM::DataArrayInt::__rpow__; %newobject ParaMEDMEM::DataArrayIntTuple::buildDAInt; -%newobject ParaMEDMEM::DataArrayChar::deepCpy; %newobject ParaMEDMEM::DataArrayChar::convertToIntArr; %newobject ParaMEDMEM::DataArrayChar::renumber; %newobject ParaMEDMEM::DataArrayChar::renumberR; @@ -312,7 +311,6 @@ using namespace INTERP_KERNEL; %newobject ParaMEDMEM::DataArrayDouble::New; %newobject ParaMEDMEM::DataArrayDouble::__iter__; %newobject ParaMEDMEM::DataArrayDouble::convertToIntArr; -%newobject ParaMEDMEM::DataArrayDouble::deepCpy; %newobject ParaMEDMEM::DataArrayDouble::performCpy; %newobject ParaMEDMEM::DataArrayDouble::Aggregate; %newobject ParaMEDMEM::DataArrayDouble::Meld; diff --git a/src/MEDCoupling_Swig/MEDCouplingMemArray.i b/src/MEDCoupling_Swig/MEDCouplingMemArray.i index 7e73d97ce..9fb9baad8 100644 --- a/src/MEDCoupling_Swig/MEDCouplingMemArray.i +++ b/src/MEDCoupling_Swig/MEDCouplingMemArray.i @@ -48,6 +48,7 @@ namespace ParaMEDMEM virtual int getNumberOfTuples() const throw(INTERP_KERNEL::Exception); virtual std::size_t getNbOfElems() const throw(INTERP_KERNEL::Exception); virtual std::size_t getNbOfElemAllocated() const throw(INTERP_KERNEL::Exception); + virtual DataArray *deepCpy() const throw(INTERP_KERNEL::Exception); void checkNbOfTuples(int nbOfTuples, const char *msg) const throw(INTERP_KERNEL::Exception); void checkNbOfComps(int nbOfCompo, const char *msg) const throw(INTERP_KERNEL::Exception); void checkNbOfTuplesAndComp(const DataArray& other, const char *msg) const throw(INTERP_KERNEL::Exception); @@ -266,7 +267,6 @@ namespace ParaMEDMEM static DataArrayDouble *New(); double doubleValue() const throw(INTERP_KERNEL::Exception); bool empty() const throw(INTERP_KERNEL::Exception); - DataArrayDouble *deepCpy() const throw(INTERP_KERNEL::Exception); DataArrayDouble *performCpy(bool deepCpy) const throw(INTERP_KERNEL::Exception); void cpyFrom(const DataArrayDouble& other) throw(INTERP_KERNEL::Exception); void reserve(std::size_t nbOfElems) throw(INTERP_KERNEL::Exception); @@ -2289,7 +2289,6 @@ namespace ParaMEDMEM int intValue() const throw(INTERP_KERNEL::Exception); int getHashCode() const throw(INTERP_KERNEL::Exception); bool empty() const throw(INTERP_KERNEL::Exception); - DataArrayInt *deepCpy() const throw(INTERP_KERNEL::Exception); DataArrayInt *performCpy(bool deepCpy) const throw(INTERP_KERNEL::Exception); void cpyFrom(const DataArrayInt& other) throw(INTERP_KERNEL::Exception); void reserve(std::size_t nbOfElems) throw(INTERP_KERNEL::Exception); @@ -4555,7 +4554,6 @@ namespace ParaMEDMEM { public: virtual DataArrayChar *buildEmptySpecializedDAChar() const throw(INTERP_KERNEL::Exception); - virtual DataArrayChar *deepCpy() const throw(INTERP_KERNEL::Exception); int getHashCode() const throw(INTERP_KERNEL::Exception); bool empty() const throw(INTERP_KERNEL::Exception); void cpyFrom(const DataArrayChar& other) throw(INTERP_KERNEL::Exception); -- 2.39.2