Compatibility#
-
enum visionflow::compatible::CompatLevel#
Compatibility level.
Values:
-
enumerator kFullyCompatible = 1#
L1, Fully Compatible - The new version of the library is not only fully compatible with the data from the old version, but also the main processing logic of the data has not changed at all. This usually means that the new version has only fixed some bugs that have no negative impact whatsoever or added some new features unrelated to the data.
-
enumerator kDataCompatible = 2#
L2, Data Compatible - The new version of the library is capable of being fully compatible with data from the old version, but some processing logic has changed, which may lead to slightly different outcomes for the same data.
-
enumerator kAutoLogicCompatible = 3#
L3, Auto Logic Compatible - The data content written by the new version of the library has changed, but the new version has automatically implemented compatibility measures to ensure that the new library can directly read data from the old version without requiring any additional processing. However, the data that has been opened and modified by the new version of the library may have undergone incompatible changes in format and content, making it no longer suitable for use with the old version of the library.
-
enumerator kUpgradeCompatible = 4#
L4, Upgrade Compatible - The new version of the library can no longer directly read data from the old version. However, we have provided an additional automatic upgrade feature. This feature involves making proactive modifications to certain parts of the old version’s data, enabling it to be recognized and utilized by the new version of the library. It’s important to note that automatic upgrading might involve the removal of outdated content from the old data and the inclusion of default values for data required by the new version of the library. These modifications could result in the upgraded data no longer maintaining the same effects and performance as the old data. You may need to edit the upgraded data according to your requirements (such as adjusting annotations, modifying parameters, or retraining models) to ensure that your project functions correctly with the upgraded data.
-
enumerator kIncompatible = 5#
L5, Incompatible - The new version of the library no longer supports reading data from the old version, and direct upgrading is not possible.
-
enumerator kUnrecognizable = 6#
L6, Unrecognizable - Unrecognized project data.
-
enumerator kFullyCompatible = 1#
-
std::vector<std::string> visionflow::compatible::query_upgrade_path(const std::string &old_version, const std::string &new_version, const std::vector<std::string> &modules = {})#
Query the update path from the old version to the new version.
- Parameters:
old_version – The old library version which the project created by.
new_version – The new library version which the project will be upgraded to.
modules – The modules list in the project. All modules will be include if this list is empty.
- Returns:
std::vector<std::string> The upgrade path.
-
CompatLevel visionflow::compatible::compatibility_level(const std::string &old_version, const std::string &new_version, const std::vector<std::string> &modules = {})#
Get Compatibility level between two versions.
- Parameters:
old_version – The old version (The project data version).
new_version – The new library version.
modules – The modules list in the project. All modules will be include if this list is empty.
- Returns:
CompatLevel The compatibility level.
-
std::string visionflow::compatible::compatibility_info(const std::string &old_version, const std::string &new_version, const std::vector<std::string> &modules = {})#
Get the compatibility information between two versions.
- Parameters:
old_version – The old version (The project data version).
new_version – The new library version.
modules – The modules list in the project. All modules will be include if this list is empty.
- Returns:
std::string The compatibility information encoded in JSON format, for example:
{ }
-
std::string visionflow::compatible::compatibility_history(const std::string &version = {})#
Get the whole compatibility records(with json format) about all history versions.
- Parameters:
version – The version of the compatibility records. If this parameter is not set, all versions will be returned.
- Returns:
std::string The compatibility records encoded in JSON format.