Salome HOME
Target MEDReader
authorageay <ageay>
Wed, 24 Jul 2013 12:49:04 +0000 (12:49 +0000)
committerageay <ageay>
Wed, 24 Jul 2013 12:49:04 +0000 (12:49 +0000)
src/MEDCoupling/MEDCouplingMemArray.hxx
src/MEDCoupling/MEDCouplingMemArrayChar.cxx
src/MEDCoupling/MEDCouplingStructuredMesh.cxx
src/MEDCoupling_Swig/MEDCouplingCommon.i
src/MEDCoupling_Swig/MEDCouplingMemArray.i

index 7a8a03013082d1efbba30d10ffcc90dcbb8af7fd..a789c9631cde326c10a5bc92937a0929396c19e8 100644 (file)
@@ -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<std::string>& 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);
index d3872cf2175a56a3ceb7b6be9411cbb6bcf1e3ba..c718b3a51d0ff43406bf8a0ad064b0c19e23780c 100644 (file)
@@ -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);
 }
index 2da06d22b16b493cbc6260de6d1cf5eeaec0686c..91ba40dd9fa6a4d1e1f3a26fbed948591a8e1ae9 100644 (file)
@@ -282,7 +282,8 @@ MEDCoupling1SGTUMesh *MEDCouplingStructuredMesh::build1SGTUnstructured() const t
  */
 MEDCouplingUMesh *MEDCouplingStructuredMesh::buildUnstructured() const throw(INTERP_KERNEL::Exception)
 {
-  return build1SGTUnstructured()->buildUnstructured();
+  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> ret0(build1SGTUnstructured());
+  return ret0->buildUnstructured();
 }
 
 /*!
index 9cdf32e5cedff3d47259f76a2e33189f76be3438..bb82ad21c63e22c81e37d6c770f1020693206e6e 100644 (file)
@@ -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;
index 7e73d97ce9e1937868c099dfe04a5df8869d3138..9fb9baad8a8498da33882f6c18cc95ae1e847cce 100644 (file)
@@ -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);