]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
First try to correct MEDReader problem under Windows.
authorgeay <anthony.geay@cea.fr>
Wed, 14 May 2014 08:45:27 +0000 (10:45 +0200)
committergeay <anthony.geay@cea.fr>
Wed, 14 May 2014 08:45:27 +0000 (10:45 +0200)
src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx
src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx
src/Plugins/MEDReader/IO/vtkMEDReader.cxx

index f3b575f24427e0f8c43933a4f824ea4f528b74d5..26a9c6cd08d1faa0c63bdaba0f03a269303d7417 100644 (file)
@@ -234,6 +234,11 @@ std::string MEDFileFieldRepresentationLeavesArrays::getZeName() const
   return _ze_full_name;
 }
 
+const char *MEDFileFieldRepresentationLeavesArrays::getZeNameC() const
+{
+  return _ze_full_name.c_str();
+}
+
 void MEDFileFieldRepresentationLeavesArrays::feedSIL(vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector<std::string>& names) const
 {
   vtkIdType refId(sil->AddChild(root,edge));
@@ -1038,6 +1043,12 @@ std::string MEDFileFieldRepresentationTree::getNameOf(int id) const
   return elt.getZeName();
 }
 
+const char *MEDFileFieldRepresentationTree::getNameOfC(int id) const
+{
+  const MEDFileFieldRepresentationLeavesArrays& elt(getLeafArr(id));
+  return elt.getZeNameC();
+}
+
 bool MEDFileFieldRepresentationTree::getStatusOf(int id) const
 {
   const MEDFileFieldRepresentationLeavesArrays& elt(getLeafArr(id));
index 4df798d682477b96532e3f8017f4be004cdd2476..6ee4b8e0551ef4bb5513edf0a8fa35388025eef3 100644 (file)
@@ -72,6 +72,7 @@ public:
   bool getStatus() const;
   bool setStatus(bool status) const;
   std::string getZeName() const;
+  const char *getZeNameC() const;
   void appendFields(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDMeshMultiLev *mml, const ParaMEDMEM::MEDFileMeshStruct *mst, vtkDataSet *ds) const;
   void appendELGAIfAny(vtkDataSet *ds) const;
 public:
@@ -136,6 +137,7 @@ public:
   void feedSIL(vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector<std::string>& names) 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;
   bool getStatusOf(int id) const;
   int getIdHavingZeName(const char *name) const;
   bool changeStatusOfAndUpdateToHaveCoherentVTKDataSet(int id, bool status) const;
index 70adeab5e7ce2d5868450e43687bf8faa116229f..769e87a4b802a452a251d4acdc0daf0a1e05cd73 100644 (file)
@@ -371,9 +371,8 @@ int vtkMEDReader::GetNumberOfFieldsTreeArrays()
 
 const char *vtkMEDReader::GetFieldsTreeArrayName(int index)
 {
-  std::string ret(this->Internal->Tree.getNameOf(index));
+  return this->Internal->Tree.getNameOfC(index);
   //std::cerr << "vtkMEDReader::GetFieldsTreeArrayName(" << index << ") called ! " << ret << std::endl;
-  return ret.c_str();
 }
 
 int vtkMEDReader::GetFieldsTreeArrayStatus(const char *name)