Salome HOME
PAL18696 SMESH : version of MED export
[modules/smesh.git] / src / SMESH_I / SMESH_Mesh_i.cxx
index 2aea23fda15805f6017df59f2b2a74967170d82c..32e8ee2bc15be6d9e36a7b8a6eef3b84bd38fab3 100644 (file)
@@ -37,6 +37,7 @@
 #include "SMESH_subMesh_i.hxx"
 
 #include "DriverMED_R_SMESHDS_Mesh.h"
+#include "DriverMED_W_SMESHDS_Mesh.h"
 #include "SMDS_VolumeTool.hxx"
 #include "SMESHDS_Command.hxx"
 #include "SMESHDS_CommandType.hxx"
@@ -244,6 +245,19 @@ SMESH_Mesh_i::ImportMEDFile( const char* theFileName, const char* theMeshName )
   return ConvertDriverMEDReadStatus(status);
 }
 
+//================================================================================
+/*!
+ * \brief Return string representation of a MED file version comprising nbDigits
+ */
+//================================================================================
+
+char* SMESH_Mesh_i::GetVersionString(SMESH::MED_VERSION version, CORBA::Short nbDigits)
+{
+  std::string ver = DriverMED_W_SMESHDS_Mesh::GetVersionString(MED::EVersion(version),
+                                                               nbDigits);
+  return CORBA::string_dup( ver.c_str() );
+}
+
 //=============================================================================
 /*!
  *  ImportUNVFile