Salome HOME
Fix on Bug PAL7927
[modules/visu.git] / src / CONVERTOR / VISUConvertor.cxx
index 24f787c28ac3ae13550d571c254715ebfa9f623c..c81e39e099d4ad76498499be833e56ac746dd95f 100644 (file)
@@ -44,8 +44,8 @@ static int MYDEBUG = 0;
 #endif
 
 void parseFile(const char* theFileName) {
-  try{
-    MESSAGE("'"<<theFileName<<"'...");
+  //try{
+    MSG(MYDEBUG,"'"<<theFileName<<"'...");
     auto_ptr<VISU_Convertor> aCon(CreateConvertor(theFileName));
     //aCon->GetSize();
     //return;
@@ -53,21 +53,21 @@ void parseFile(const char* theFileName) {
     VISU::TMeshMap::const_iterator aMeshMapIter = aMeshMap.begin();
     for(; aMeshMapIter != aMeshMap.end(); aMeshMapIter++){
       const string& aMeshName = aMeshMapIter->first;
-      const VISU::TMesh& aMesh = aMeshMapIter->second;
-      const VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh.myMeshOnEntityMap;
+      const VISU::PMesh& aMesh = aMeshMapIter->second;
+      const VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
       VISU::TMeshOnEntityMap::const_iterator aMeshOnEntityMapIter;
       //Import fields
       aMeshOnEntityMapIter = aMeshOnEntityMap.begin();
       for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++){
        const VISU::TEntity& anEntity = aMeshOnEntityMapIter->first;
-       const VISU::TMeshOnEntity& aMeshOnEntity = aMeshOnEntityMapIter->second;
-       const VISU::TFieldMap& aFieldMap = aMeshOnEntity.myFieldMap;
+       const VISU::PMeshOnEntity& aMeshOnEntity = aMeshOnEntityMapIter->second;
+       const VISU::TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
        VISU::TFieldMap::const_reverse_iterator aFieldMapIter = aFieldMap.rbegin();
        for(; aFieldMapIter != aFieldMap.rend(); aFieldMapIter++){
          const string& aFieldName = aFieldMapIter->first;
-         const VISU::TField& aField = aFieldMapIter->second;
-         const VISU::TField::TValField& aValField = aField.myValField;
-         VISU::TField::TValField::const_iterator aValFieldIter = aValField.begin();
+         const VISU::PField& aField = aFieldMapIter->second;
+         const VISU::TValField& aValField = aField->myValField;
+         VISU::TValField::const_iterator aValFieldIter = aValField.begin();
          for(; aValFieldIter != aValField.end(); aValFieldIter++){
            int aTimeStamp = aValFieldIter->first;
            aCon->GetTimeStampOnMesh(aMeshName,anEntity,aFieldName,aTimeStamp);
@@ -77,7 +77,7 @@ void parseFile(const char* theFileName) {
       }
       //continue;
       //Importing groups
-      const VISU::TGroupMap& aGroupMap = aMesh.myGroupMap;
+      const VISU::TGroupMap& aGroupMap = aMesh->myGroupMap;
       VISU::TGroupMap::const_iterator aGroupMapIter = aGroupMap.begin();
       for(; aGroupMapIter != aGroupMap.end(); aGroupMapIter++){
        const string& aGroupName = aGroupMapIter->first;
@@ -87,9 +87,9 @@ void parseFile(const char* theFileName) {
       aMeshOnEntityMapIter = aMeshOnEntityMap.begin();
       for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++){
        const VISU::TEntity& anEntity = aMeshOnEntityMapIter->first;
-       const VISU::TMeshOnEntity& aMeshOnEntity = aMeshOnEntityMapIter->second;
+       const VISU::PMeshOnEntity& aMeshOnEntity = aMeshOnEntityMapIter->second;
        //aCon->GetMeshOnEntity(aMeshName,anEntity);
-       const VISU::TFamilyMap& aFamilyMap = aMeshOnEntity.myFamilyMap;
+       const VISU::TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap;
        VISU::TFamilyMap::const_iterator aFamilyMapIter = aFamilyMap.begin();
        for(; aFamilyMapIter != aFamilyMap.end(); aFamilyMapIter++){
          const string& aFamilyName = aFamilyMapIter->first;
@@ -103,17 +103,16 @@ void parseFile(const char* theFileName) {
        aCon->GetMeshOnEntity(aMeshName,anEntity);
       }
     }
-  OK:
-    MESSAGE("OK");
-  }catch(std::exception& exc){
-    MESSAGE("Follow exception was occured in file:"<<theFileName<<"\n"<<exc.what());
-  }catch(...){
-    MESSAGE("Unknown exception was occured in VISU_Convertor_impl in file:"<<theFileName);
-  } 
+    MSG(MYDEBUG,"OK");
+//   }catch(std::exception& exc){
+//    MSG(MYDEBUG,"Follow exception was occured in file:"<<theFileName<<"\n"<<exc.what());
+//   }catch(...){
+//    MSG(MYDEBUG,"Unknown exception was occured in VISU_Convertor_impl in file:"<<theFileName);
+//   } 
 }
 
 int main(int argc, char** argv){ 
-  try{
+  //try{
     if(argc > 1){
       QFileInfo fi(argv[1]);
       for(int i = 0; i < 1; i++){
@@ -132,10 +131,10 @@ int main(int argc, char** argv){
       }
       return 0;
     }
-  }catch(std::exception& exc){
-    MESSAGE("Follow exception was occured :\n"<<exc.what());
-  }catch(...){
-    MESSAGE("Unknown exception was occured in VISU_Convertor_impl");
-  } 
+  //}catch(std::exception& exc){
+  //  MSG(MYDEBUG,"Follow exception was occured :\n"<<exc.what());
+  //}catch(...){
+  //  MSG(MYDEBUG,"Unknown exception was occured in VISU_Convertor_impl");
+  //
   return 1;
 }