]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Ready for pickelization
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 19 Oct 2016 10:51:29 +0000 (12:51 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 19 Oct 2016 10:51:29 +0000 (12:51 +0200)
14 files changed:
src/MEDLoader/MEDFileData.hxx
src/MEDLoader/MEDFileEquivalence.hxx
src/MEDLoader/MEDFileField.cxx
src/MEDLoader/MEDFileField.hxx
src/MEDLoader/MEDFileJoint.cxx
src/MEDLoader/MEDFileJoint.hxx
src/MEDLoader/MEDFileMesh.cxx
src/MEDLoader/MEDFileMesh.hxx
src/MEDLoader/MEDFileParameter.cxx
src/MEDLoader/MEDFileParameter.hxx
src/MEDLoader/MEDFileUtilities.cxx
src/MEDLoader/MEDFileUtilities.hxx
src/MEDLoader/MEDFileUtilities.txx [new file with mode: 0644]
src/MEDLoader/Swig/MEDLoaderCommon.i

index 6b31f20967a9ce4df6446ebe8afccf5353654fd4..c7f9233367c207fabae30f72e54fdf6871d8e3de 100644 (file)
@@ -37,6 +37,7 @@ namespace MEDCoupling
     MEDLOADER_EXPORT static MEDFileData *New(const std::string& fileName);
     MEDLOADER_EXPORT static MEDFileData *New(med_idt fid);
     MEDLOADER_EXPORT static MEDFileData *New();
+    MEDLOADER_EXPORT static MEDFileData *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileData>(db); }
     MEDLOADER_EXPORT MEDFileData *deepCopy() const;
     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
index 050159890f43085d5dbe6cdd6439ec69a1e9bd82..67d04ce209d4578de54f8094a108b3ebf4e5f851 100644 (file)
@@ -24,7 +24,7 @@
 #include "MEDLoaderDefines.hxx"
 #include "MEDCouplingRefCountObject.hxx"
 #include "MEDCouplingMemArray.hxx"
-#include "MEDFileUtilities.hxx"
+#include "MEDFileUtilities.txx"
 #include "MCAuto.hxx"
 
 #include <vector>
index 810e06da65e21ed5f7fe555597e13f46da8a5e2b..0235798dfeff61560ab69546004073062286541c 100644 (file)
@@ -22,7 +22,6 @@
 #include "MEDFileMesh.hxx"
 #include "MEDLoaderBase.hxx"
 #include "MEDLoaderTraits.hxx"
-#include "MEDFileUtilities.hxx"
 #include "MEDFileSafeCaller.txx"
 #include "MEDFileFieldOverView.hxx"
 
index f201eed5a12816a94dcd3b69aee3d567c711f954..de637f10fbbcebbe8ad9b8372fbd780caa3273a4 100644 (file)
@@ -24,7 +24,7 @@
 #include "MEDLoaderDefines.hxx"
 
 #include "MEDFileFieldOverView.hxx"
-#include "MEDFileUtilities.hxx"
+#include "MEDFileUtilities.txx"
 
 #include "MCAuto.hxx"
 #include "MEDLoaderTraits.hxx"
@@ -737,6 +737,7 @@ namespace MEDCoupling
   public:
     MEDLOADER_EXPORT static MEDFileField1TS *New(const std::string& fileName, bool loadAll=true);
     MEDLOADER_EXPORT static MEDFileField1TS *New(med_idt fid, bool loadAll=true);
+    MEDLOADER_EXPORT static MEDFileField1TS *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileField1TS>(db); }
     MEDLOADER_EXPORT static MEDFileField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
     MEDLOADER_EXPORT static MEDFileField1TS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
     MEDLOADER_EXPORT static MEDFileField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
@@ -787,6 +788,7 @@ namespace MEDCoupling
     MEDLOADER_EXPORT static MEDFileIntField1TS *New();
     MEDLOADER_EXPORT static MEDFileIntField1TS *New(const std::string& fileName, bool loadAll=true);
     MEDLOADER_EXPORT static MEDFileIntField1TS *New(med_idt fid, bool loadAll=true);
+    MEDLOADER_EXPORT static MEDFileIntField1TS *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileIntField1TS>(db); }
     MEDLOADER_EXPORT static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
     MEDLOADER_EXPORT static MEDFileIntField1TS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
     MEDLOADER_EXPORT static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
@@ -1048,6 +1050,7 @@ namespace MEDCoupling
     MEDLOADER_EXPORT static MEDFileFieldMultiTS *New();
     MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const std::string& fileName, bool loadAll=true);
     MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(med_idt fid, bool loadAll=true);
+    MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileFieldMultiTS>(db); }
     MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
     MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
     MEDLOADER_EXPORT static MEDFileFieldMultiTS *New(const MEDFileFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
@@ -1095,6 +1098,7 @@ namespace MEDCoupling
     MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New();
     MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const std::string& fileName, bool loadAll=true);
     MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(med_idt fid, bool loadAll=true);
+    MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileIntFieldMultiTS>(db); }
     MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
     MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
     MEDLOADER_EXPORT static MEDFileIntFieldMultiTS *New(const MEDFileIntFieldMultiTSWithoutSDA& other, bool shallowCopyOfContent);
@@ -1152,6 +1156,7 @@ namespace MEDCoupling
     MEDLOADER_EXPORT static MEDFileFields *New();
     MEDLOADER_EXPORT static MEDFileFields *New(const std::string& fileName, bool loadAll=true);
     MEDLOADER_EXPORT static MEDFileFields *New(med_idt fid, bool loadAll=true);
+    MEDLOADER_EXPORT static MEDFileFields *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileFields>(db); }
     MEDLOADER_EXPORT static MEDFileFields *LoadPartOf(const std::string& fileName, bool loadAll=true, const MEDFileMeshes *ms=0);
     MEDLOADER_EXPORT static MEDFileFields *LoadSpecificEntities(const std::string& fileName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);
     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
index 0895ba94bbe4a0915369ecf753ddfba595df0bf1..8e7d6f3c1883a44afa347714bde4cb97ede64142 100644 (file)
@@ -18,7 +18,6 @@
 //
 
 #include "MEDFileJoint.hxx"
-#include "MEDFileUtilities.hxx"
 #include "MEDLoader.hxx"
 #include "MEDLoaderBase.hxx"
 #include "MEDFileSafeCaller.txx"
index bba126ccc433619bfbe20e28cf2a3aa2b5ec0f6d..c05c6a6868e728e71fa21641fdf266f45bd4d25f 100644 (file)
@@ -21,7 +21,7 @@
 #define __MEDFILEJOINT_HXX__
 
 #include "MEDLoaderDefines.hxx"
-#include "MEDFileUtilities.hxx"
+#include "MEDFileUtilities.txx"
 #include "MEDCouplingMemArray.hxx"
 #include "MCAuto.hxx"
 
index d001e5ce998370be8e76f631b8be04bb1e89255d..40dee2a20cd7141fd92b01a84178a886d52d3f46 100644 (file)
@@ -19,7 +19,6 @@
 // Author : Anthony Geay (CEA/DEN)
 
 #include "MEDFileMesh.hxx"
-#include "MEDFileUtilities.hxx"
 #include "MEDFileFieldOverView.hxx"
 #include "MEDFileField.hxx"
 #include "MEDLoader.hxx"
index 4bd228285e18cb895d773a1dbfa9702e8a14b464..de52190bf5a9b6b2d4c2164a71e99b0abd1f5773 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "MEDLoaderDefines.hxx"
 #include "MEDFileMeshLL.hxx"
-#include "MEDFileUtilities.hxx"
+#include "MEDFileUtilities.txx"
 #include "MEDCouplingPartDefinition.hxx"
 #include "MEDFileMeshReadSelector.hxx"
 #include "MEDFileJoint.hxx"
@@ -42,6 +42,7 @@ namespace MEDCoupling
   public:
     MEDLOADER_EXPORT static MEDFileMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
     MEDLOADER_EXPORT static MEDFileMesh *New(med_idt fid, MEDFileMeshReadSelector *mrs=0);
+    MEDLOADER_EXPORT static MEDFileMesh *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileMesh>(db); }
     MEDLOADER_EXPORT static MEDFileMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0, MEDFileJoints* joints=0);
     MEDLOADER_EXPORT static MEDFileMesh *New(med_idt fid, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0, MEDFileJoints* joints=0);
     MEDLOADER_EXPORT void writeLL(med_idt fid) const;
@@ -252,6 +253,7 @@ namespace MEDCoupling
     MEDLOADER_EXPORT static MEDFileUMesh *New(med_idt fid, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
     MEDLOADER_EXPORT static MEDFileUMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
     MEDLOADER_EXPORT static MEDFileUMesh *New(med_idt fid, MEDFileMeshReadSelector *mrs=0);
+    MEDLOADER_EXPORT static MEDFileUMesh *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileUMesh>(db); }
     MEDLOADER_EXPORT static MEDFileUMesh *New(const MEDCouplingMappedExtrudedMesh *mem);
     MEDLOADER_EXPORT static MEDFileUMesh *New();
     MEDLOADER_EXPORT static MEDFileUMesh *LoadPartOf(const std::string& fileName, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<int>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
@@ -459,6 +461,7 @@ namespace MEDCoupling
     MEDLOADER_EXPORT static MEDFileCMesh *New();
     MEDLOADER_EXPORT static MEDFileCMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
     MEDLOADER_EXPORT static MEDFileCMesh *New(med_idt fid, MEDFileMeshReadSelector *mrs=0);
+    MEDLOADER_EXPORT static MEDFileCMesh *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileCMesh>(db); }
     MEDLOADER_EXPORT static MEDFileCMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
     MEDLOADER_EXPORT static MEDFileCMesh *New(med_idt fid, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
@@ -494,6 +497,7 @@ namespace MEDCoupling
     MEDLOADER_EXPORT static MEDFileCurveLinearMesh *New();
     MEDLOADER_EXPORT static MEDFileCurveLinearMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
     MEDLOADER_EXPORT static MEDFileCurveLinearMesh *New(med_idt fid, MEDFileMeshReadSelector *mrs=0);
+    MEDLOADER_EXPORT static MEDFileCurveLinearMesh *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileCurveLinearMesh>(db); }
     MEDLOADER_EXPORT static MEDFileCurveLinearMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
     MEDLOADER_EXPORT static MEDFileCurveLinearMesh *New(med_idt fid, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
@@ -558,6 +562,7 @@ namespace MEDCoupling
   public:
     MEDLOADER_EXPORT static MEDFileMeshes *New();
     MEDLOADER_EXPORT static MEDFileMeshes *New(med_idt fid);
+    MEDLOADER_EXPORT static MEDFileMeshes *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileMeshes>(db); }
     MEDLOADER_EXPORT static MEDFileMeshes *New(const std::string& fileName);
     MEDLOADER_EXPORT MEDFileMeshes *deepCopy() const;
     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
index 335c158d0321c91a97b4ea9df8461a4d429e054b..39cd3abdf44a075b7283c4d6fc9ba6d136192ade 100644 (file)
@@ -19,7 +19,6 @@
 // Author : Anthony Geay (CEA/DEN)
 
 #include "MEDFileParameter.hxx"
-#include "MEDFileUtilities.hxx"
 #include "MEDFileSafeCaller.txx"
 #include "MEDLoaderBase.hxx"
 
index f827b23b28f31c15ac7a768cb4d1d0e05347b8c3..08aa7ab90bfa5430d364d9bbedac354951902268 100644 (file)
@@ -22,7 +22,7 @@
 #define __MEDFILEPARAMETER_HXX__
 
 #include "MEDLoaderDefines.hxx"
-#include "MEDFileUtilities.hxx"
+#include "MEDFileUtilities.txx"
 #include "MEDCouplingMemArray.hxx"
 #include "MCAuto.hxx"
 
@@ -159,6 +159,7 @@ namespace MEDCoupling
   public:
     MEDLOADER_EXPORT static MEDFileParameters *New();
     MEDLOADER_EXPORT static MEDFileParameters *New(med_idt fid);
+    MEDLOADER_EXPORT static MEDFileParameters *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileParameters>(db); }
     MEDLOADER_EXPORT static MEDFileParameters *New(const std::string& fileName);
     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
index e697d8135a8ec2bcf27949accb96c4566d4f08a0..201388f6a59f2bfeaf58832c42afa371795b99c1 100644 (file)
@@ -25,6 +25,8 @@
 
 #include <sstream>
 
+const char MEDCoupling::MEDFileWritableStandAlone::DFT_FILENAME_IN_MEM[]="DftFileNameInMemory";
+
 med_access_mode MEDFileUtilities::TraduceWriteMode(int medloaderwritemode)
 {
   switch(medloaderwritemode)
@@ -183,3 +185,25 @@ void MEDCoupling::MEDFileWritableStandAlone::write(const std::string& fileName,
   MEDFileUtilities::CheckMEDCode(fid,fid,oss.str());
   writeLL(fid);
 }
+
+void MEDCoupling::MEDFileWritableStandAlone::write30(const std::string& fileName, int mode) const
+{
+  med_access_mode medmod(MEDFileUtilities::TraduceWriteMode(mode));
+  throw INTERP_KERNEL::Exception("MEDFileWritableStandAlone::write30 : will be implemented with MEDFile >= 3.2.1 !");
+  //MEDFileUtilities::AutoFid fid(MEDfileVersionOpen(fileName.c_str(),medmod,3,0,0));
+  //writeLL(fid);
+}
+
+MEDCoupling::MCAuto<MEDCoupling::DataArrayByte> MEDCoupling::MEDFileWritableStandAlone::serialize() const
+{
+  med_memfile memfile=MED_MEMFILE_INIT;
+  memfile.app_image_ptr=0;
+  memfile.app_image_size=0;
+  //
+  MEDFileUtilities::AutoFid fid(MEDmemFileOpen(DFT_FILENAME_IN_MEM,&memfile,MED_FALSE,MED_ACC_CREAT));
+  writeLL(fid);
+  //
+  MEDCoupling::MCAuto<MEDCoupling::DataArrayByte> ret(MEDCoupling::DataArrayByte::New());
+  ret->useArray(reinterpret_cast<char *>(memfile.app_image_ptr),true,C_DEALLOC,memfile.app_image_size,1);
+  return ret;
+}
index 8116d7e5ce72c80d3ef2f080087f0ce23cac6af8..a89260fbce3dbbb900d066caae770b07b79c1c71 100644 (file)
@@ -24,6 +24,9 @@
 #include "InterpKernelException.hxx"
 #include "MEDLoaderDefines.hxx"
 
+#include "MCAuto.hxx"
+#include "MEDCouplingMemArray.hxx"
+
 #include "med.h"
 
 namespace MEDFileUtilities
@@ -66,6 +69,12 @@ namespace MEDCoupling
   public:
     MEDLOADER_EXPORT virtual void writeLL(med_idt fid) const = 0;
     MEDLOADER_EXPORT virtual void write(const std::string& fileName, int mode) const;
+    MEDLOADER_EXPORT virtual void write30(const std::string& fileName, int mode) const;
+    MEDLOADER_EXPORT MCAuto<DataArrayByte> serialize() const;
+  public:
+    MEDLOADER_EXPORT static const char DFT_FILENAME_IN_MEM[];
+    template<class T>
+    static T *BuildFromMemoryChunk(DataArrayByte *db);
   };
   
   MEDFileUtilities::AutoFid OpenMEDFileForRead(const std::string& fileName);
diff --git a/src/MEDLoader/MEDFileUtilities.txx b/src/MEDLoader/MEDFileUtilities.txx
new file mode 100644 (file)
index 0000000..9e3f8ba
--- /dev/null
@@ -0,0 +1,39 @@
+// Copyright (C) 2016  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Anthony Geay (EDF R&D)
+
+#ifndef __MEDFILEUTILITIES_TXX__
+#define __MEDFILEUTILITIES_TXX__
+
+#include "MEDFileUtilities.hxx"
+
+template<class T>
+T *MEDCoupling::MEDFileWritableStandAlone::BuildFromMemoryChunk(MEDCoupling::DataArrayByte *db)
+{
+  if(!db)
+    throw INTERP_KERNEL::Exception("Null input DataArrayByte !");
+  db->checkAllocated();
+  med_memfile memfile=MED_MEMFILE_INIT;
+  memfile.app_image_ptr=db->getPointer();
+  memfile.app_image_size=db->getNbOfElems();
+  MEDFileUtilities::AutoFid fid(MEDmemFileOpen(MEDCoupling::MEDFileWritableStandAlone::DFT_FILENAME_IN_MEM,&memfile,MED_FALSE,MED_ACC_RDONLY));
+  return T::New(fid);
+}
+
+#endif
index 89ac8920e0ffb8e05221cc7f66f05056266da5df..45b90ddbd5b061e95cf525c87df0a035d0deb9a3 100644 (file)
@@ -153,6 +153,7 @@ using namespace MEDCoupling;
 %newobject MEDCoupling::MEDFileFields::__iter__;
 %newobject MEDCoupling::MEDFileFields::extractPart;
 
+%newobject MEDCoupling::MEDFileWritableStandAlone::serialize;
 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::New;
 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::deepCopy;
 %newobject MEDCoupling::MEDFileAnyTypeFieldMultiTS::shallowCpy;
@@ -536,6 +537,15 @@ namespace MEDCoupling
   {
   public:
     void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
+    void write30(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
+    %extend
+       {
+         DataArrayByte *serialize() const throw(INTERP_KERNEL::Exception)
+         {
+           MCAuto<DataArrayByte> ret(self->serialize());
+           return ret.retn();
+         }
+       }
   };
   
   class MEDFileMeshReadSelector
@@ -916,6 +926,7 @@ namespace MEDCoupling
   public:
     static MEDFileMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     static MEDFileMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
+    static MEDFileMesh *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
     virtual MEDFileMesh *createNewEmpty() const throw(INTERP_KERNEL::Exception);
     virtual MEDFileMesh *deepCopy() const throw(INTERP_KERNEL::Exception);
     virtual MEDFileMesh *shallowCpy() const throw(INTERP_KERNEL::Exception);
@@ -1228,6 +1239,7 @@ namespace MEDCoupling
     static MEDFileUMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     static MEDFileUMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     static MEDFileUMesh *New(const MEDCouplingMappedExtrudedMesh *mem) throw(INTERP_KERNEL::Exception);
+    static MEDFileUMesh *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
     static MEDFileUMesh *New();
     static const char *GetSpeStr4ExtMesh();
     ~MEDFileUMesh();
@@ -1280,6 +1292,11 @@ namespace MEDCoupling
            return MEDFileUMesh::New(mem);
          }
 
+         MEDFileUMesh(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
+         {
+           return MEDFileUMesh::New(db);
+         }
+
          MEDFileUMesh()
          {
            return MEDFileUMesh::New();
@@ -1543,6 +1560,7 @@ namespace MEDCoupling
   {
   public:
     static MEDFileCMesh *New();
+    static MEDFileCMesh *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
     static MEDFileCMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     static MEDFileCMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     void setMesh(MEDCouplingCMesh *m) throw(INTERP_KERNEL::Exception);
@@ -1563,6 +1581,11 @@ namespace MEDCoupling
          {
            return MEDFileCMesh::New(fileName,mName,dt,it,mrs);
          }
+
+         MEDFileCMesh(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
+         {
+           return MEDFileCMesh::New(db);
+         }
          
          PyObject *getMesh() const throw(INTERP_KERNEL::Exception)
          {
@@ -1578,6 +1601,7 @@ namespace MEDCoupling
   {
   public:
     static MEDFileCurveLinearMesh *New();
+    static MEDFileCurveLinearMesh *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
     static MEDFileCurveLinearMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     static MEDFileCurveLinearMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0) throw(INTERP_KERNEL::Exception);
     void setMesh(MEDCouplingCurveLinearMesh *m) throw(INTERP_KERNEL::Exception);
@@ -1597,6 +1621,11 @@ namespace MEDCoupling
          {
            return MEDFileCurveLinearMesh::New(fileName,mName,dt,it,mrs);
          }
+
+         MEDFileCurveLinearMesh(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
+         {
+           return MEDFileCurveLinearMesh::New(db);
+         }
          
          PyObject *getMesh() const throw(INTERP_KERNEL::Exception)
          {
@@ -1671,7 +1700,7 @@ namespace MEDCoupling
   {
   public:
     static MEDFileMeshes *New();
-    static MEDFileMeshes *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
+    static MEDFileMeshes *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
     MEDFileMeshes *deepCopy() const throw(INTERP_KERNEL::Exception);
     int getNumberOfMeshes() const throw(INTERP_KERNEL::Exception);
     std::vector<std::string> getMeshesNames() const throw(INTERP_KERNEL::Exception);
@@ -1693,6 +1722,11 @@ namespace MEDCoupling
            return MEDFileMeshes::New(fileName);
          }
 
+         MEDFileMeshes(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
+         {
+           return MEDFileMeshes::New(db);
+         }
+
          std::string __str__() const throw(INTERP_KERNEL::Exception)
            {
              return self->simpleRepr();
@@ -2058,6 +2092,7 @@ namespace MEDCoupling
     static MEDFileField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception);
     static MEDFileField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
     static MEDFileField1TS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
+    static MEDFileField1TS *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
     static MEDFileField1TS *New();
     MEDCoupling::MEDFileIntField1TS *convertToInt(bool isDeepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
     MEDCouplingFieldDouble *field(const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception);
@@ -2088,6 +2123,11 @@ namespace MEDCoupling
            return MEDFileField1TS::New(fileName,fieldName,iteration,order,loadAll);
          }
 
+         MEDFileField1TS(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
+         {
+           return MEDFileField1TS::New(db);
+         }
+
          MEDFileField1TS()
          {
            return MEDFileField1TS::New();
@@ -2192,6 +2232,7 @@ namespace MEDCoupling
   public:
     static MEDFileIntField1TS *New();
     static MEDFileIntField1TS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
+    static MEDFileIntField1TS *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
     static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
     static MEDFileIntField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true) throw(INTERP_KERNEL::Exception);
     MEDCoupling::MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const throw(INTERP_KERNEL::Exception);
@@ -2226,6 +2267,11 @@ namespace MEDCoupling
         return MEDFileIntField1TS::New(fileName,fieldName,iteration,order,loadAll);
       }
 
+      MEDFileIntField1TS(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
+      {
+        return MEDFileIntField1TS::New(db);
+      }
+
       std::string __str__() const throw(INTERP_KERNEL::Exception)
       {
         return self->simpleRepr();
@@ -2798,6 +2844,7 @@ namespace MEDCoupling
     static MEDFileIntFieldMultiTS *New();
     static MEDFileIntFieldMultiTS *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
     static MEDFileIntFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
+    static MEDFileIntFieldMultiTS *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
     //
     void appendFieldNoProfileSBT(const MEDCouplingFieldInt *field) throw(INTERP_KERNEL::Exception);
     void appendFieldProfile(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
@@ -2825,6 +2872,11 @@ namespace MEDCoupling
         return MEDFileIntFieldMultiTS::New(fileName,fieldName,loadAll);
       }
 
+      MEDFileIntFieldMultiTS(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
+      {
+        return MEDFileIntFieldMultiTS::New(db);
+      }
+
       static MEDFileIntFieldMultiTS *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, PyObject *entities, bool loadAll=true)
       {
         std::vector<std::pair<int,int> > tmp(convertTimePairIdsFromPy(entities));
@@ -2868,6 +2920,7 @@ namespace MEDCoupling
   public:
     static MEDFileFields *New() throw(INTERP_KERNEL::Exception);
     static MEDFileFields *New(const std::string& fileName, bool loadAll=true) throw(INTERP_KERNEL::Exception);
+    static MEDFileFields *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
     static MEDFileFields *LoadPartOf(const std::string& fileName, bool loadAll=true, const MEDFileMeshes *ms=0) throw(INTERP_KERNEL::Exception);
     MEDFileFields *deepCopy() const throw(INTERP_KERNEL::Exception);
     MEDFileFields *shallowCpy() const throw(INTERP_KERNEL::Exception);
@@ -2899,6 +2952,11 @@ namespace MEDCoupling
          {
            return MEDFileFields::New(fileName,loadAll);
          }
+
+         MEDFileFields(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
+         {
+           return MEDFileFields::New(db);
+         }
          
          std::string __str__() const throw(INTERP_KERNEL::Exception)
          {
@@ -3345,6 +3403,7 @@ namespace MEDCoupling
   public:
     static MEDFileParameters *New();
     static MEDFileParameters *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
+    static MEDFileParameters *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
     MEDFileParameters *deepCopy() const throw(INTERP_KERNEL::Exception);
     std::vector<std::string> getParamsNames() const throw(INTERP_KERNEL::Exception);
     std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
@@ -3366,6 +3425,11 @@ namespace MEDCoupling
         return MEDFileParameters::New(fileName);
       }
 
+      MEDFileParameters(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
+      {
+        return MEDFileParameters::New(db);
+      }
+      
       std::string __str__() const throw(INTERP_KERNEL::Exception)
       {
         return self->simpleRepr();
@@ -3429,6 +3493,7 @@ namespace MEDCoupling
   class MEDFileData : public RefCountObject, public MEDFileWritableStandAlone
   {
   public:
+    static MEDFileData *New(DataArrayByte *db) throw(INTERP_KERNEL::Exception);
     static MEDFileData *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
     static MEDFileData *New();
     MEDFileData *deepCopy() const throw(INTERP_KERNEL::Exception);
@@ -3449,6 +3514,11 @@ namespace MEDCoupling
            return MEDFileData::New(fileName);
          }
 
+         MEDFileData(DataArrayByte *db) throw(INTERP_KERNEL::Exception)
+         {
+           return MEDFileData::New(db);
+         }
+
          MEDFileData()
          {
            return MEDFileData::New();