From: Paul RASCLE Date: Thu, 3 Oct 2019 15:06:11 +0000 (+0200) Subject: fix MED version supported, comments to explain what must be updated when MED version... X-Git-Tag: V9_4_0a2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c7ec4c445efff4359ba4bf0e2e9101843081d0f2;hp=e29ec7a70acec28e1edc81be3706c54df0ee9b49;p=modules%2Fsmesh.git fix MED version supported, comments to explain what must be updated when MED version changes --- diff --git a/src/MEDWrapper/MED_Factory.cxx b/src/MEDWrapper/MED_Factory.cxx index 5a34a963f..d9c273b65 100644 --- a/src/MEDWrapper/MED_Factory.cxx +++ b/src/MEDWrapper/MED_Factory.cxx @@ -46,16 +46,25 @@ extern "C" // ------------------------------------------------------------------------------------------------------------------- // --- MED file compatibility: write using a lower major version implies append on an empty file of the target version +// +// ******************************************************************************************************************* +// ==> This file must be modified when MED version changes: +// MED_MAJOR_NUM and MED_MINOR_NUM are defined in an external include from MED prerequisite: med.h +// When MED_MAJOR_NUM or MED_MINOR_NUM changes, MED_MAJOR_EXPECTED and MED_MINOR_EXPECTED must be set accordingly +// and MED_VERSIONS_APPEND_COMPATIBLE must be updated: The lower compatible versions may change with a new MED version +// If the major version of MED change (for instance 4 --> 5) and if MED allows to append meshes in MED-4.x format, +// Empty file content for MED-4.x should be provided (EMPTY_FILE_4x) and method CreateEmptyMEDFile should be updated. +// ******************************************************************************************************************* #define MED_MAJOR_EXPECTED 4 -#define MED_MINOR_EXPECTED 0 +#define MED_MINOR_EXPECTED 1 #if MED_MAJOR_NUM != MED_MAJOR_EXPECTED - #error "MED major version does not correspond to the expected version, fix the minor and major compatibility values in CheckCompatibility method (MED_VERSIONS_APPEND_COMPATIBLE) and set the correct expected version" + #error "MED major version does not correspond to the expected version, fix the minor and major compatibility values in CheckCompatibility method (MED_VERSIONS_APPEND_COMPATIBLE) and set the correct expected version (MED_MAJOR_EXPECTED, MED_MINOR_EXPECTED)" #endif -#if MED_MINOR_NUM < MED_MINOR_EXPECTED - #error "MED minor version does not correspond to the expected version, fix the minor and major compatibility values in CheckCompatibility method (MED_VERSIONS_APPEND_COMPATIBLE) and set the correct expected version" +#if MED_MINOR_NUM != MED_MINOR_EXPECTED + #error "MED minor version does not correspond to the expected version, fix the minor and major compatibility values in CheckCompatibility method (MED_VERSIONS_APPEND_COMPATIBLE) and set the correct expected version above (MED_MAJOR_EXPECTED, MED_MINOR_EXPECTED)" #endif -#define MED_VERSIONS_APPEND_COMPATIBLE {40, 32, 33} // --- 10*major + minor (the 3rd digit, release, is not used here, +#define MED_VERSIONS_APPEND_COMPATIBLE {41, 40, 32, 33} // --- 10*major + minor (the 3rd digit, release, is not used here, // med uses always the latest available) // --- The first in the list should be the default: current version // --- empty med file content for the different MED versions with a different major.