- remove(theFileName.c_str());
-
- PWrapper aWrapper;
- switch(theId){
- case eV2_2:
- aWrapper.reset(new MED::V2_2::TVWrapper(theFileName));
- break;
- case eV2_1:
- EXCEPTION(std::runtime_error,"Cannot open file '"<<theFileName<<"'. Med version 2.1 is not supported any more.");
- //aWrapper.reset(new MED::V2_1::TVWrapper(theFileName));
- break;
- default:
- aWrapper.reset(new MED::V2_2::TVWrapper(theFileName));
+ //remove(theFileName.c_str());
+ EXCEPTION(std::runtime_error,"Cannot open file for writing '"<<theFileName<<"'. existing file with another Med version.");
+
+ aVersion = theId;
+ int theMinor = -1; // not supported
+ switch (aVersion)
+ {
+ case eV2_1: break; // not supported
+ case eVUnknown:
+ case eV2_2:
+ case eLATEST: theMinor = MED_MINOR_NUM; break;
+ default: theMinor = aVersion - eMINOR_0;