#include <peak_common/types/peak_common_version.hpp>
Public Member Functions | |
| Version (uint32_t major, uint32_t minor, uint32_t subminor, uint32_t patch) | |
| uint32_t | GetMajor () const |
| Retrieves the major version component. | |
| uint32_t | GetMinor () const |
| Retrieves the minor version component. | |
| uint32_t | GetSubminor () const |
| Retrieves the subminor version component. | |
| uint32_t | GetPatch () const |
| Retrieves the patch version component. | |
| bool | operator== (const Version &other) const |
| Checks if two versions are equal. | |
| bool | operator!= (const Version &other) const |
| Checks if two versions are not equal. | |
| bool | operator< (const Version &other) const |
| Checks if this version is less than another version. | |
| bool | operator> (const Version &other) const |
| Checks if this version is greater than another version. | |
| std::string | ToString () const |
| Converts the version to its string representation (e.g., "1.2.3.4"). | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, Version version) |
| Outputs the version in dot-separated string format (e.g., "1.2.3.4"). | |
Represents a structured version identifier with four components: major, minor, subminor, and patch.
The version format follows the common scheme: major.minor.subminor.patch, where each component represents a different level of change or compatibility. This class provides utilities for comparing versions and converting them to string format.
Definition at line 36 of file peak_common_version.hpp.
|
inline |
Definition at line 188 of file peak_common_version.hpp.
|
inline |
Retrieves the major version component.
This is the first part of the version string: major.minor.subminor.patch.
Definition at line 195 of file peak_common_version.hpp.
|
inline |
Retrieves the minor version component.
This is the second part of the version string: major.minor.subminor.patch.
Definition at line 200 of file peak_common_version.hpp.
|
inline |
Retrieves the patch version component.
This is the fourth part of the version string: major.minor.subminor.patch.
Definition at line 210 of file peak_common_version.hpp.
|
inline |
Retrieves the subminor version component.
This is the third part of the version string: major.minor.subminor.patch.
Definition at line 205 of file peak_common_version.hpp.
|
inline |
Checks if two versions are not equal.
| other | The version to compare with. |
Definition at line 108 of file peak_common_version.hpp.
|
inline |
Checks if this version is less than another version.
Comparison is performed lexicographically based on version components.
| other | The version to compare with. |
other; false otherwise.Definition at line 123 of file peak_common_version.hpp.
|
inline |
Checks if two versions are equal.
| other | The version to compare with. |
Definition at line 94 of file peak_common_version.hpp.
|
inline |
Checks if this version is greater than another version.
| other | The version to compare with. |
other; false otherwise.Definition at line 137 of file peak_common_version.hpp.
|
inline |
Converts the version to its string representation (e.g., "1.2.3.4").
Definition at line 163 of file peak_common_version.hpp.
|
friend |
Outputs the version in dot-separated string format (e.g., "1.2.3.4").
| os | Output stream. |
| version | The version to write. |
Definition at line 151 of file peak_common_version.hpp.