cppDataPipeline 0.3.0
C++ Implementation of the FAIR Data Pipeline API
|
class describing the semantic version of an object More...
#include <fdp/utilities/semver.hxx>
Public Member Functions | |
version ()=default | |
Construct a new version with the default start value of 0.1.0 More... | |
version (unsigned int major, unsigned int minor, unsigned int patch, meta_tag tag=meta_tag::RELEASE, unsigned int tag_v=1E9, std::string meta_data="") | |
Construct a new version from integer representation. More... | |
version (const std::string version_str) | |
version (const version &v) | |
void | bump_major () |
void | bump_minor () |
void | bump_patch () |
void | alpha () |
void | beta () |
void | prerelease () |
void | release () |
std::string | to_string () const |
Friends | |
std::ostream & | operator<< (std::ostream &os, const version &v) |
bool | operator< (const version &v1, const version &v2) |
bool | operator> (const version &v1, const version &v2) |
bool | operator== (const version &v1, const version &v2) |
bool | operator!= (const version &v1, const version &v2) |
bool | operator<= (const version &v1, const version &v2) |
bool | operator>= (const version &v1, const version &v2) |
class describing the semantic version of an object
This class allows the comparison and validation of semantic version numbers and ensures that all data objects handled follow the same protocol
|
default |
Construct a new version with the default start value of 0.1.0
|
inline |
Construct a new version from integer representation.
Constructs a version object with the forms:
MAJOR.MINOR.PATCH-<tag>.<tag-version>+<meta-data>
where parts in <>
are optional. The default for tag_v
of 1E9
is used to, as a default, represent a version that is a full release
major | the MAJOR release number |
minor | the MINOR release number |
patch | the PATCH release number |
tag | if applicable, whether release is alpha, beta etc. |
tag_v | if applicable, the version of the tag, e.g. -alpha.2 |
meta_data | if applicable, additional metadata, e.g. +<build_num> |