mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-05 06:10:33 +05:00
PAL18696 SMESH : version of MED export
+ static std::string GetVersionString(const MED::EVersion theVersion, int theNbDigits=2);
This commit is contained in:
parent
881539145f
commit
277a199f30
@ -66,6 +66,24 @@ void DriverMED_W_SMESHDS_Mesh::SetFile(const std::string& theFileName)
|
|||||||
return SetFile(theFileName,MED::eV2_2);
|
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)
|
void DriverMED_W_SMESHDS_Mesh::SetMeshName(const std::string& theMeshName)
|
||||||
{
|
{
|
||||||
myMeshName = theMeshName;
|
myMeshName = theMeshName;
|
||||||
|
@ -48,6 +48,7 @@ class MESHDRIVERMED_EXPORT DriverMED_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh
|
|||||||
|
|
||||||
virtual void SetFile(const std::string& theFileName);
|
virtual void SetFile(const std::string& theFileName);
|
||||||
void SetFile(const std::string& theFileName, MED::EVersion theId);
|
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()
|
/*! sets file name; only for usage with Add(), not Write()
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user