Salome HOME
Revert "Synchronize adm files"
[tools/medcoupling.git] / src / MEDLoader / SauvReader.hxx
index 0b9b6989e5a501827772b1670fbf7cbd80e9e607..e937cbf92d5f1457521633be070b4c07c006c7da 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014  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.
+// 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
 namespace SauvUtilities
 {
   class FileReader;
-  class IntermediateMED;
-  class Group;
-  class DoubleField;
+  struct IntermediateMED;
+  struct Group;
+  struct DoubleField;
 }
 namespace ParaMEDMEM
 {
   class MEDFileData;
 
-class MEDLOADER_EXPORT SauvReader : public ParaMEDMEM::RefCountObject
+class SauvReader : public ParaMEDMEM::RefCountObject
 {
  public:
-  static SauvReader* New(const char *fileName) throw(INTERP_KERNEL::Exception);
-  ParaMEDMEM::MEDFileData * loadInMEDFileDS() throw(INTERP_KERNEL::Exception);
-  ~SauvReader();
+  MEDLOADER_EXPORT static SauvReader* New(const std::string& fileName);
+  MEDLOADER_EXPORT ParaMEDMEM::MEDFileData * loadInMEDFileDS();
+  MEDLOADER_EXPORT ~SauvReader();
 
  private:
-  std::size_t getHeapMemorySize() const { return 0; }
-
+  std::size_t getHeapMemorySizeWithoutChildren() const;
+  std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
   void readRecord2();
   void readRecord4();
   void readRecord7();
@@ -72,7 +72,8 @@ class MEDLOADER_EXPORT SauvReader : public ParaMEDMEM::RefCountObject
   void read_PILE_MODL         (const int nbObjects, std::vector<std::string>& objectNames, std::vector<int>& nameIndices);
   void read_PILE_FIELD        (const int nbObjects, std::vector<std::string>& objectNames, std::vector<int>& nameIndices);
 
-  SauvUtilities::Group* getFieldSupport(const std::vector<SauvUtilities::Group*>& fieldSupports);
+  void setFieldSupport(const std::vector<SauvUtilities::Group*>& supports,
+                       SauvUtilities::DoubleField*               field);
   void setFieldNames(const std::vector<SauvUtilities::DoubleField*>& fields,
                      const std::vector<std::string>& objectNames,
                      const std::vector<int>& nameIndices);