version.h
Version
-
struct version
Public Members
-
uint16_t major
Major version number.
-
uint16_t minor
Minor version number.
-
uint16_t patch
Patch(or revision) version number.
-
std::string stage
Release stage name, if present.
-
std::string machine
Machine name, if present.
-
std::string prerelease
Prerelease name (e.g. rc1), if present.
-
std::string build
Build info, if present. Often a date string.
-
uint16_t major
-
version ouster::util::version_from_string(const std::string &ver)
Get version from string. Parses strings of the format: STAGE-MACHINE-vMAJOR.MINOR.PATCH-PRERELEASE+BUILD Requires at least major.minor.patch to return a valid version.
- Parameters:
ver – [in] string.
- Returns:
version corresponding to the string, or invalid_version on error.
-
inline bool operator==(const version &u, const version &v)
Equality operation for version structs.
- Parameters:
u – [in] The first version to compare.
v – [in] The second version to compare.
- Returns:
If the versions are the same.
-
inline bool operator<(const version &u, const version &v)
Less than operation for version structs.
- Parameters:
u – [in] The first version to compare.
v – [in] The second version to compare.
- Returns:
If the first version is less than the second version.
-
inline bool operator<=(const version &u, const version &v)
Less than or equal to operation for version structs.
- Parameters:
u – [in] The first version to compare.
v – [in] The second version to compare.
- Returns:
If the first version is less than or equal to the second version.
-
inline bool operator!=(const version &u, const version &v)
In-equality operation for version structs.
- Parameters:
u – [in] The first version to compare.
v – [in] The second version to compare.
- Returns:
If the versions are not the same.
-
inline bool operator>=(const version &u, const version &v)
Greater than or equal to operation for version structs.
- Parameters:
u – [in] The first version to compare.
v – [in] The second version to compare.
- Returns:
If the first version is greater than or equal to the second version.
-
inline bool operator>(const version &u, const version &v)
Greater than operation for version structs.
- Parameters:
u – [in] The first version to compare.
v – [in] The second version to compare.
- Returns:
If the first version is greater than the second version.