X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDWrapper%2FFactory%2FMED_Factory.cxx;fp=src%2FMEDWrapper%2FFactory%2FMED_Factory.cxx;h=6c1d9909b8b0e4f77c1c228e07bcfc398dfde8c2;hb=51760fb76f57da9ab446585e6f87b101679c58cb;hp=49d47fad57d72413dfafdc7e48e6bc47e0a0a135;hpb=9d73526fbc8ecc160281df9046ad4aed0b57e779;p=modules%2Fsmesh.git diff --git a/src/MEDWrapper/Factory/MED_Factory.cxx b/src/MEDWrapper/Factory/MED_Factory.cxx index 49d47fad5..6c1d9909b 100644 --- a/src/MEDWrapper/Factory/MED_Factory.cxx +++ b/src/MEDWrapper/Factory/MED_Factory.cxx @@ -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 '"<