Salome HOME
Merge branch 'master' of https://codev-tuleap.cea.fr/plugins/git/salome/smesh
[modules/smesh.git] / src / SMESH_I / SMESH_Gen_i.cxx
index f01646e74344c93f9c3762746765d622f5f793ae..8258f4ceaafb05e4733b18bd27fac91e0ed5dd7c 100644 (file)
@@ -2959,7 +2959,7 @@ char* SMESH_Gen_i::GetMEDVersion(const char* theFileName)
 /*!
  *  SMESH_Gen_i::CheckCompatibility
  *
- *  Check compatibility of file with MED format being used.
+ *  Check compatibility of file with MED format being used, read only.
  */
 //================================================================================
 CORBA::Boolean SMESH_Gen_i::CheckCompatibility(const char* theFileName)
@@ -2967,6 +2967,18 @@ CORBA::Boolean SMESH_Gen_i::CheckCompatibility(const char* theFileName)
   return MED::CheckCompatibility( theFileName );
 }
 
+//================================================================================
+/*!
+ *  SMESH_Gen_i::CheckWriteCompatibility
+ *
+ *  Check compatibility of file with MED format being used, for append on write.
+ */
+//================================================================================
+CORBA::Boolean SMESH_Gen_i::CheckWriteCompatibility(const char* theFileName)
+{
+  return MED::CheckCompatibility( theFileName, true );
+}
+
 //================================================================================
 /*!
  *  SMESH_Gen_i::GetMeshNames
@@ -2976,10 +2988,12 @@ CORBA::Boolean SMESH_Gen_i::CheckCompatibility(const char* theFileName)
 //================================================================================
 SMESH::string_array* SMESH_Gen_i::GetMeshNames(const char* theFileName)
 {
+  //MESSAGE("GetMeshNames " << theFileName);
   SMESH::string_array_var aResult = new SMESH::string_array();
   MED::PWrapper aMed = MED::CrWrapperR( theFileName );
   MED::TErr anErr;
   MED::TInt aNbMeshes = aMed->GetNbMeshes( &anErr );
+  //MESSAGE("---" << aNbMeshes);
   if( anErr >= 0 ) {
     aResult->length( aNbMeshes );
     for( MED::TInt i = 0; i < aNbMeshes; i++ ) {