X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDWrapper%2FFactory%2FMED_Factory.cxx;h=6c1d9909b8b0e4f77c1c228e07bcfc398dfde8c2;hb=98e8c177214dcc9d7b48f00048f165526aeca06e;hp=f4108be584cd1a671031c1d2b4def94335926624;hpb=f050ab35304c662a16612e31b646529ed1be13a2;p=modules%2Fsmesh.git diff --git a/src/MEDWrapper/Factory/MED_Factory.cxx b/src/MEDWrapper/Factory/MED_Factory.cxx index f4108be58..6c1d9909b 100644 --- a/src/MEDWrapper/Factory/MED_Factory.cxx +++ b/src/MEDWrapper/Factory/MED_Factory.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -23,7 +23,6 @@ #include "MED_Factory.hxx" #include "MED_Utilities.hxx" #include "MED_V2_2_Wrapper.hxx" - #include #include #include @@ -90,6 +89,7 @@ namespace MED if(aMajor == 2 && aMinor == 1) aVersion = eV2_1; else + // TODO: check major is not superior to library and switch on minor aVersion = eV2_2; } else { @@ -124,20 +124,19 @@ namespace MED } PWrapper CrWrapper(const std::string& theFileName, - bool theDoPreCheckInSeparateProcess) + bool theDoPreCheckInSeparateProcess, + int theMinor) { PWrapper aWrapper; + if (theMinor <0) + theMinor = MED_MINOR_NUM; EVersion aVersion = GetVersionId(theFileName,theDoPreCheckInSeparateProcess); switch(aVersion){ - case eV2_2: - aWrapper.reset(new MED::V2_2::TVWrapper(theFileName)); - break; case eV2_1: EXCEPTION(std::runtime_error,"Cannot open file '"<