Salome HOME
Merge remote-tracking branch 'origin/rnv/vtk_opengl2_backend' into V8_1_BR
[modules/paravis.git] / src / Plugins / MEDReader / IO / MEDFileFieldRepresentationTree.hxx
index 2e5234c6cf888c53e2c4f5570adeecf14ad076c0..800e8c47ba6b1491be7bf282c07f51de14471b29 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2010-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
@@ -61,11 +61,11 @@ private:
   mutable std::vector< std::vector< std::pair< vtkQuadratureSchemeDefinition *, unsigned char > > > _defs;
 };
 
-class MEDLOADERFORPV_EXPORT MEDFileFieldRepresentationLeavesArrays : public MEDCoupling::MEDCouplingAutoRefCountObjectPtr<MEDCoupling::MEDFileAnyTypeFieldMultiTS>
+class MEDLOADERFORPV_EXPORT MEDFileFieldRepresentationLeavesArrays : public MEDCoupling::MCAuto<MEDCoupling::MEDFileAnyTypeFieldMultiTS>
 {
 public:
   MEDFileFieldRepresentationLeavesArrays();
-  MEDFileFieldRepresentationLeavesArrays(const MEDCoupling::MEDCouplingAutoRefCountObjectPtr<MEDCoupling::MEDFileAnyTypeFieldMultiTS>& arr);
+  MEDFileFieldRepresentationLeavesArrays(const MEDCoupling::MCAuto<MEDCoupling::MEDFileAnyTypeFieldMultiTS>& arr);
   MEDFileFieldRepresentationLeavesArrays& operator=(const MEDFileFieldRepresentationLeavesArrays& other);
   int getId() const;
   void setId(int& id) const;
@@ -85,6 +85,7 @@ public:
   static const char NUM_ID_CELL_NAME[];
   static const char FAMILY_ID_NODE_NAME[];
   static const char NUM_ID_NODE_NAME[];
+  static const char GLOBAL_NODE_ID_NAME[];
 private:
   mutable bool _activated;
   mutable int _id;
@@ -97,8 +98,8 @@ class MEDLOADERFORPV_EXPORT MEDFileFieldRepresentationLeaves
 {
 public:
   MEDFileFieldRepresentationLeaves();
-  MEDFileFieldRepresentationLeaves(const std::vector< MEDCoupling::MEDCouplingAutoRefCountObjectPtr<MEDCoupling::MEDFileAnyTypeFieldMultiTS> >& arr,
-                                   const MEDCoupling::MEDCouplingAutoRefCountObjectPtr<MEDCoupling::MEDFileFastCellSupportComparator>& fsp);
+  MEDFileFieldRepresentationLeaves(const std::vector< MEDCoupling::MCAuto<MEDCoupling::MEDFileAnyTypeFieldMultiTS> >& arr,
+                                   const MEDCoupling::MCAuto<MEDCoupling::MEDFileFastCellSupportComparator>& fsp);
   ~MEDFileFieldRepresentationLeaves();
   bool empty() const;
   void setId(int& id) const;
@@ -125,7 +126,7 @@ private:
   void appendFields(const MEDTimeReq *tr, const MEDCoupling::MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDMeshMultiLev *mml, const MEDCoupling::MEDFileMeshes *meshes, vtkDataSet *ds) const;
 private:
   std::vector<MEDFileFieldRepresentationLeavesArrays> _arrays;
-  MEDCoupling::MEDCouplingAutoRefCountObjectPtr<MEDCoupling::MEDFileFastCellSupportComparator> _fsp;
+  MEDCoupling::MCAuto<MEDCoupling::MEDFileFastCellSupportComparator> _fsp;
   mutable vtkDataSet *_cached_ds;
 };
 
@@ -138,6 +139,7 @@ public:
   void activateTheFirst() const;
   void computeFullNameInLeaves() const;
   void feedSIL(vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector<std::string>& names) const;
+  std::string getActiveMeshName() const;
   std::string feedSILForFamsAndGrps(vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector<std::string>& names) const;
   std::string getNameOf(int id) const;
   const char *getNameOfC(int id) const;
@@ -153,6 +155,7 @@ public:
   std::map<std::string,bool> dumpState() const;
   //non const methods
   void loadMainStructureOfFile(const char *fileName, bool isMEDOrSauv, int iPart, int nbOfParts);
+  void loadInMemory(MEDCoupling::MEDFileFields *fields, MEDCoupling::MEDFileMeshes *meshes);
   void removeEmptyLeaves();
   // static methods
   static bool IsFieldMeshRegardingInfo(const std::vector<std::string>& compInfos);
@@ -171,8 +174,8 @@ private:
 private:
   // 1st : timesteps, 2nd : meshName, 3rd : common support
   std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > > _data_structure;
-  MEDCoupling::MEDCouplingAutoRefCountObjectPtr<MEDCoupling::MEDFileMeshes> _ms;
-  MEDCoupling::MEDCouplingAutoRefCountObjectPtr<MEDCoupling::MEDFileFields> _fields;
+  MEDCoupling::MCAuto<MEDCoupling::MEDFileMeshes> _ms;
+  MEDCoupling::MCAuto<MEDCoupling::MEDFileFields> _fields;
 };
 
 class MEDLOADERFORPV_EXPORT TimeKeeper