cppDataPipeline 0.3.0
C++ Implementation of the FAIR Data Pipeline API
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
FairDataPipeline::Versioning::version Class Reference

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)
 

Detailed Description

class describing the semantic version of an object


Author
K. Zarebski (UKAEA)

This class allows the comparison and validation of semantic version numbers and ensures that all data objects handled follow the same protocol

Constructor & Destructor Documentation

◆ version() [1/2]

FairDataPipeline::Versioning::version::version ( )
default

Construct a new version with the default start value of 0.1.0


Author
K. Zarebski (UKAEA)

◆ version() [2/2]

FairDataPipeline::Versioning::version::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 = "" 
)
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

Parameters
majorthe MAJOR release number
minorthe MINOR release number
patchthe PATCH release number
tagif applicable, whether release is alpha, beta etc.
tag_vif applicable, the version of the tag, e.g. -alpha.2
meta_dataif applicable, additional metadata, e.g. +<build_num>

The documentation for this class was generated from the following files: