+/*!
+ * MED version is either the latest available, or with an inferior minor,
+ * to ensure backward compatibility on writing med files.
+ */
+string DriverMED_W_SMESHDS_Mesh::GetVersionString(int theMinor, int theNbDigits)
+{
+ TInt majeur, mineur, release;
+ majeur=MED_MAJOR_NUM;
+ mineur=MED_MINOR_NUM;
+ release=MED_RELEASE_NUM;
+ TInt imposedMineur = mineur;
+
+ if (theMinor < 0)
+ imposedMineur = mineur;
+ else if (theMinor > MED_MINOR_NUM)
+ imposedMineur = mineur;
+ else
+ imposedMineur = theMinor;
+
+ ostringstream name;
+ if ( theNbDigits > 0 )
+ name << majeur;
+ if ( theNbDigits > 1 )
+ name << "." << imposedMineur;
+ if ( theNbDigits > 2 )
+ name << "." << release;
+ return name.str();
+}
+