|
Home2L - C/C++ API v1.4-2-g83f4c (2025-08-23)
Smart Tools for a Private Home
|
Numeric version handling.
Helpers to convert version strings to numbers and vice versa. Version numbers of type uint32_t can be compared arbitrarily in order to check if some tool is newer or older than some reference.

Functions | |
| static uint32_t | VersionCompose (uint8_t major, uint8_t minor, uint16_t revision, bool dirty=false) |
| static int | VersionMajor (uint32_t ver) |
| Get the major component of the version. | |
| static int | VersionMinor (uint32_t ver) |
| Get the minor component of the version. | |
| static int | VersionRevision (uint32_t ver) |
| Get the revision component of the version. | |
| static bool | VersionDirty (uint32_t ver) |
| Get the "dirty" component of the version. | |
| uint32_t | VersionFromStr (const char *str) |
| Get a numeric representation of the version string. On syntax error, a warning is logged and 0 is returned. | |
| const char * | VersionToStr (class CString *ret, uint32_t ver) |
| Get a string representation of the version. This may be shorter than an eventual original string passed to VersionFromStr(), i.e. an eventual git ID is missing. | |
| static const char * | VersionGetOwnAsStr () |
| Get my own build version as a string. | |
| uint32_t | VersionGetOwn () |
| Get my own build version. | |
|
inlinestatic |
<Compose a numeric representation of the version.
| major | is the major version component. |
| minor | is the minor version component. |
| revision | is the revision version component. |
| dirty | is a flag indicating whether the code has been modified locally compared to the version. |