Salome HOME
SWIG exception: removing C++11 warnings, minimal work.
[tools/medcoupling.git] / src / MEDLoader / MEDFileMeshSupport.cxx
index 9f8daa813b3370f9ea4f2e4554473c4124308b6f..c1fb5c051c7b8ee8b05625dbf3244940d2d280aa 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2019  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
@@ -90,6 +90,15 @@ void MEDFileMeshSupports::writeLL(med_idt fid) const
       (*it)->writeLL(fid);
 }
 
+std::vector<std::string> MEDFileMeshSupports::getSupMeshNames() const
+{
+  std::vector<std::string> ret;
+  for(std::vector< MCAuto<MEDFileUMesh> >::const_iterator it=_supports.begin();it!=_supports.end();it++)
+    if((*it).isNotNull())
+      ret.push_back((*it)->getName());
+  return ret;
+}
+
 const MEDFileUMesh *MEDFileMeshSupports::getSupMeshWithName(const std::string& name) const
 {
   std::vector<std::string> mns;
@@ -105,7 +114,7 @@ const MEDFileUMesh *MEDFileMeshSupports::getSupMeshWithName(const std::string& n
         }
     }
   std::ostringstream oss;
-  oss << "MEDFileMeshSupports::getSupMeshWithName : no such name \"" << name << "\". Possibilitities are :";
+  oss << "MEDFileMeshSupports::getSupMeshWithName : no such name \"" << name << "\". Possibilities are :";
   std::copy(mns.begin(),mns.end(),std::ostream_iterator<std::string>(oss,","));
   oss << " !";
   throw INTERP_KERNEL::Exception(oss.str());