tfel
Loading...
Searching...
No Matches
mfront::CompatibilityMode Struct Reference

struct describing the various compatibility modes available More...

#include </home/runner/work/tfel/tfel/mfront/include/MFront/CompatibilityMode.hxx>

Classes

struct  Version
 simple data structure describing a version with three numbers named major, minor and patch More...

Static Public Member Functions

static MFRONT_VISIBILITY_EXPORT Version fromString (std::string_view)
 convert the given string to a version

Static Public Attributes

static constexpr auto future
 compatibility mode with the next (unpublished) major version
static constexpr auto v5_2_0
static constexpr auto known_compatibility_modes = std::array{v5_2_0}
 list of compatibility modes

Detailed Description

struct describing the various compatibility modes available

Compatibility modes are made for introducing breaking changes in the results or in the behaviour of MFront. Two examples motivated the introduction of this concept:

  • the modification of the values defined in the PhysicalConstants library to be more accurate and up-to-date.
  • the evolution of the PowellDogLeg algorithms to a more robust and classical version.

Those evolutions do not correct bugs, but changes the default MFront's behaviour and the results of the generated code for the better. Compatibility modes are meant to restore the behaviour of previous versions when needed for backward compatibility.

Note that such evolutions of the default MFront's behaviour shall only be tolerated on major versions. To be able to use such evolutions in the current version for testing and/or anticipating changes, the future compatibility mode allows changes that will be the default in the next major version.

Compatibility modes can be defined globally on the command line using --default-compatibility-mode or in a file using the compatibility_mode DSL option.

Member Function Documentation

◆ fromString()

MFRONT_VISIBILITY_EXPORT Version mfront::CompatibilityMode::fromString ( std::string_view )
static

convert the given string to a version

Returns
the version read in the string
Parameters
[in]sstring

Member Data Documentation

◆ future

auto mfront::CompatibilityMode::future
inlinestaticconstexpr
Initial value:
=
Version{.major = std::numeric_limits<std::size_t>::max(),
.minor = std::numeric_limits<std::size_t>::max(),
.patch = std::numeric_limits<std::size_t>::max()}
simple data structure describing a version with three numbers named major, minor and patch
Definition CompatibilityMode.hxx:58

compatibility mode with the next (unpublished) major version

◆ v5_2_0

auto mfront::CompatibilityMode::v5_2_0
inlinestaticconstexpr
Initial value:
=
Version{.major = 5, .minor = 2, .patch = 0}

The documentation for this struct was generated from the following file: