OpenCPN Partial API docs
|
Versions uses a modified semantic versioning scheme: major.minor.revision.post-tag+build. More...
#include <semantic_vers.h>
Public Member Functions | |
SemanticVersion () | |
Construct a "0.0.0.0" version. More... | |
SemanticVersion (int major, int minor, int rev=0, int post=0, std::string pre="", std::string build="") | |
bool | operator< (const SemanticVersion &other) |
bool | operator== (const SemanticVersion &other) |
bool | operator> (const SemanticVersion &other) |
bool | operator<= (const SemanticVersion &other) |
bool | operator>= (const SemanticVersion &other) |
bool | operator!= (const SemanticVersion &other) |
std::string | to_string () |
Return printable representation. More... | |
Static Public Member Functions | |
static SemanticVersion | parse (std::string s) |
Parse a version string, sets major == -1 on errors. More... | |
Public Attributes | |
int | major |
int | minor |
int | patch |
int | post |
std::string | pre |
std::string | build |
Versions uses a modified semantic versioning scheme: major.minor.revision.post-tag+build.
for example 1.2.6.1-alfa+deadbee. The values major, minor, revision and post should be integers. The tag is a pre-release marker, the build part is build info.
Parsing and comparing follows the spec besides
See: https://semver.org/
Definition at line 51 of file semantic_vers.h.
SemanticVersion::SemanticVersion | ( | ) |
Construct a "0.0.0.0" version.
Definition at line 59 of file semantic_vers.cpp.
SemanticVersion::SemanticVersion | ( | int | major, |
int | minor, | ||
int | rev = 0 , |
||
int | post = 0 , |
||
std::string | pre = "" , |
||
std::string | build = "" |
||
) |
Definition at line 62 of file semantic_vers.cpp.
bool SemanticVersion::operator!= | ( | const SemanticVersion & | other | ) |
Definition at line 97 of file semantic_vers.cpp.
bool SemanticVersion::operator< | ( | const SemanticVersion & | other | ) |
Definition at line 72 of file semantic_vers.cpp.
bool SemanticVersion::operator<= | ( | const SemanticVersion & | other | ) |
Definition at line 89 of file semantic_vers.cpp.
bool SemanticVersion::operator== | ( | const SemanticVersion & | other | ) |
Definition at line 80 of file semantic_vers.cpp.
bool SemanticVersion::operator> | ( | const SemanticVersion & | other | ) |
Definition at line 85 of file semantic_vers.cpp.
bool SemanticVersion::operator>= | ( | const SemanticVersion & | other | ) |
Definition at line 93 of file semantic_vers.cpp.
|
static |
Parse a version string, sets major == -1 on errors.
Definition at line 37 of file semantic_vers.cpp.
std::string SemanticVersion::to_string | ( | ) |
Return printable representation.
Definition at line 121 of file semantic_vers.cpp.
std::string SemanticVersion::build |
Definition at line 57 of file semantic_vers.h.
int SemanticVersion::major |
Definition at line 52 of file semantic_vers.h.
int SemanticVersion::minor |
Definition at line 53 of file semantic_vers.h.
int SemanticVersion::patch |
Definition at line 54 of file semantic_vers.h.
int SemanticVersion::post |
Definition at line 55 of file semantic_vers.h.
std::string SemanticVersion::pre |
Definition at line 56 of file semantic_vers.h.