Salome HOME
Initial merge of branch 'BR_HYDRO_IMPS_2016' into BR_PORTING_OCCT_7
[modules/hydro.git] / src / HYDROData / HYDROData_CalculationCase.cxx
index d0949778ad6e792cd8d126b9b19e588c1f109d21..f1b7a564105e49b32db3b81f6ee22fb0ee3b2282 100644 (file)
@@ -85,7 +85,6 @@
 #define _DEVDEBUG_
 #include "HYDRO_trace.hxx"
 
-IMPLEMENT_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_CalculationCase, HYDROData_Entity)
 
 HYDROData_CalculationCase::HYDROData_CalculationCase()
@@ -1046,7 +1045,8 @@ QString HYDROData_CalculationCase::Export( int theStudyId ) const
   SALOMEDS::Study_var aDSStudy = HYDROData_GeomTool::GetStudyByID( theStudyId );
   
   QString aGeomObjEntry, anErrorMsg;
-  bool isOK = Export( aGEOMEngine, aDSStudy, aGeomObjEntry, anErrorMsg );
+  QString statMess;
+  bool isOK = Export( aGEOMEngine, aDSStudy, aGeomObjEntry, anErrorMsg, statMess );
   return isOK ? aGeomObjEntry : QString();
 #endif
 }
@@ -1055,7 +1055,8 @@ QString HYDROData_CalculationCase::Export( int theStudyId ) const
 bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var  theGeomEngine,
                                         SALOMEDS::Study_ptr theStudy,
                                         QString& theGeomObjEntry,
-                                        QString& theErrorMsg ) const
+                                        QString& theErrorMsg,
+                                        QString& statMess) const
 {
   HYDROData_ShapesGroup::SeqOfGroupsDefs aSeqOfGroupsDefs;
 
@@ -1122,8 +1123,9 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var  theGeomEngine,
   if( aRes && !GetLandCoverMap().IsNull() && !GetStricklerTable().IsNull() )
   {
     QString aTelemacFileName = GetName() + ".telemac";
-    aRes = GetLandCoverMap()->ExportTelemac( aTelemacFileName, 1E-2, GetStricklerTable() );
-    theErrorMsg = QString( "The export to TELEMAC %1 failed" ).arg( aTelemacFileName );
+    aRes = GetLandCoverMap()->ExportTelemac( aTelemacFileName, 1E-2, GetStricklerTable(), statMess );
+    if (!aRes)
+      theErrorMsg = QString( "The export to TELEMAC %1 failed" ).arg( aTelemacFileName );
   }
   return aRes;
 }