Salome HOME
Temporarily deactivating failing tests on mapping for intersection
[tools/medcoupling.git] / src / MEDLoader / MEDFileUtilities.hxx
index 24eab985ab4a0d86612f8f53b42983708e3d0516..27c93158dae4129ca9eaecba8a904d2d13c73453 100644 (file)
@@ -24,6 +24,9 @@
 #include "InterpKernelException.hxx"
 #include "MEDLoaderDefines.hxx"
 
+#include "MCAuto.hxx"
+#include "MEDCouplingMemArray.hxx"
+
 #include "med.h"
 
 namespace MEDFileUtilities
@@ -50,6 +53,7 @@ namespace MEDCoupling
   {
   public:
     MEDFileWritable();
+    virtual ~MEDFileWritable() {}
     void copyOptionsFrom(const MEDFileWritable& other) const;
     int getTooLongStrPolicy() const;
     void setTooLongStrPolicy(int newVal);
@@ -60,6 +64,22 @@ namespace MEDCoupling
     mutable int _too_long_str;
     mutable int _zipconn_pol;
   };
+
+  class MEDFileWritableStandAlone : public MEDFileWritable
+  {
+  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;
+    MEDLOADER_EXPORT static std::string GenerateUniqueDftFileNameInMem();
+  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);
 }
 
 #endif