return SetFile(theFileName,MED::eV2_2);
}
+string DriverMED_W_SMESHDS_Mesh::GetVersionString(const MED::EVersion theVersion, int theNbDigits)
+{
+ TInt majeur, mineur, release;
+ majeur = mineur = release = 0;
+ if ( theVersion == eV2_1 )
+ MED::GetVersionRelease<eV2_1>(majeur, mineur, release);
+ else
+ MED::GetVersionRelease<eV2_2>(majeur, mineur, release);
+ ostringstream name;
+ if ( theNbDigits > 0 )
+ name << majeur;
+ if ( theNbDigits > 1 )
+ name << "." << mineur;
+ if ( theNbDigits > 2 )
+ name << "." << release;
+ return name.str();
+}
+
void DriverMED_W_SMESHDS_Mesh::SetMeshName(const std::string& theMeshName)
{
myMeshName = theMeshName;
#ifndef _INCLUDE_DRIVERMED_W_SMESHDS_MESH
#define _INCLUDE_DRIVERMED_W_SMESHDS_MESH
+#include "SMESH_DriverMED.hxx"
+
#include "Driver_SMESHDS_Mesh.h"
#include "MED_Factory.hxx"
class SMESHDS_GroupBase;
class SMESHDS_SubMesh;
-class DriverMED_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh
+class MESHDRIVERMED_EXPORT DriverMED_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh
{
public:
virtual void SetFile(const std::string& theFileName);
void SetFile(const std::string& theFileName, MED::EVersion theId);
+ static std::string GetVersionString(const MED::EVersion theVersion, int theNbDigits=2);
/*! sets file name; only for usage with Add(), not Write()
*/