Salome HOME
Debugging before generation of classic fields/meshes from structure elements...
[tools/medcoupling.git] / src / MEDLoader / MEDFileData.hxx
index d483d08f05447800846c57a0e033c6f23121f120..f9713a86bb35ff912b47c319156859aedb3671c4 100644 (file)
@@ -25,6 +25,8 @@
 #include "MEDFileParameter.hxx"
 #include "MEDFileField.hxx"
 #include "MEDFileMesh.hxx"
+#include "MEDFileMeshSupport.hxx"
+#include "MEDFileStructureElement.hxx"
 
 namespace MEDCoupling
 {
@@ -35,7 +37,9 @@ namespace MEDCoupling
   {
   public:
     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;
@@ -50,6 +54,9 @@ namespace MEDCoupling
     MEDLOADER_EXPORT int getNumberOfParams() const;
     MEDLOADER_EXPORT std::string simpleRepr() const;
     //
+    MEDLOADER_EXPORT std::string getHeader() const;
+    MEDLOADER_EXPORT void setHeader(const std::string& header);
+    //
     MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
     MEDLOADER_EXPORT bool changeMeshName(const std::string& oldMeshName, const std::string& newMeshName);
     MEDLOADER_EXPORT bool unPolyzeMeshes();
@@ -58,11 +65,17 @@ namespace MEDCoupling
     MEDLOADER_EXPORT void writeLL(med_idt fid) const;
   private:
     MEDFileData();
-    MEDFileData(const std::string& fileName);
+    MEDFileData(med_idt fid);
+    void readHeader(med_idt fid);
+    void writeHeader(med_idt fid) const;
+    void readMeshSupports(med_idt fid);
   private:
     MCAuto<MEDFileFields> _fields;
     MCAuto<MEDFileMeshes> _meshes;
     MCAuto<MEDFileParameters> _params;
+    MCAuto<MEDFileMeshSupports> _mesh_supports;
+    MCAuto<MEDFileStructureElements> _struct_elems;
+    std::string _header;
   };
 }