+//=======================================================================
+//function : FileInfoToString
+//purpose : Persistence of file info
+//=======================================================================
+
+std::string SMESH_Mesh_i::FileInfoToString()
+{
+ std::string s;
+ if ( &_medFileInfo.in() && _medFileInfo->fileName[0] )
+ {
+ s = SMESH_Comment( _medFileInfo->fileSize )
+ << " " << _medFileInfo->major
+ << " " << _medFileInfo->minor
+ << " " << _medFileInfo->release
+ << " " << _medFileInfo->fileName;
+ }
+ return s;
+}
+
+//=======================================================================
+//function : FileInfoFromString
+//purpose : Persistence of file info
+//=======================================================================
+
+void SMESH_Mesh_i::FileInfoFromString(const std::string& info)
+{
+ std::string size, major, minor, release, fileName;
+ std::istringstream is(info);
+ is >> size >> major >> minor >> release;
+ fileName = info.data() + ( size.size() + 1 +
+ major.size() + 1 +
+ minor.size() + 1 +
+ release.size()+ 1 );
+
+ _medFileInfo = new SMESH::MedFileInfo();
+ _medFileInfo->fileName = fileName.c_str();
+ _medFileInfo->fileSize = atoi( size.c_str() );
+ _medFileInfo->major = atoi( major.c_str() );
+ _medFileInfo->minor = atoi( minor.c_str() );
+ _medFileInfo->release = atoi( release.c_str() );
+}
+