Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
Maria::SemanticVersionNumber Class Reference

#include <MSemanticVersionNumber.h>

Public Member Functions

 SemanticVersionNumber (int major=0, int minor=0, int patch=0, const std::string &releaseState="")
 
std::string GetVersionString () const
 Get string rep of version number.
 
int GetMajor () const
 Major version, only increase for incompatible API changes.
 
int GetMinor () const
 Minor version, increase for backwards compatible added/changed functionality.
 
int GetPatch () const
 Patch version, increase for bugfixes not affectiong API/interface.
 
void SetMajor (int major)
 
void SetMinor (int minor)
 
void SetPatch (int patch)
 
const std::string & GetReleaseState () const
 Release state string (optional)
 
int CompareTo (const SemanticVersionNumber &other) const
 
bool Equals (const SemanticVersionNumber &other) const
 
bool operator== (const SemanticVersionNumber &other) const
 
bool operator!= (const SemanticVersionNumber &other) const
 
unsigned int getHashKey () const
 

Static Public Member Functions

static bool Parse (const std::string &vs, SemanticVersionNumber &version)
 
static int Compare (const SemanticVersionNumber &a, const SemanticVersionNumber &b)
 

Friends

bool operator< (const SemanticVersionNumber &l, const SemanticVersionNumber &r)
 

Detailed Description

SemanticVersionNumber - Semantic version number, http://semver.org/

Constructor & Destructor Documentation

◆ SemanticVersionNumber()

Maria::SemanticVersionNumber::SemanticVersionNumber ( int  major = 0,
int  minor = 0,
int  patch = 0,
const std::string &  releaseState = "" 
)
inline

Constructor

Parameters
majorMajor version, incompatible API changes
minorMinor version, backwards compatible added/changed functionality
patchBackwards compatible bugfixes
releaseStateString identifying (pre) release state, ex "RC", "DRAFT". If not set, "release" type version is assumed (default)

Member Function Documentation

◆ Compare()

static int Maria::SemanticVersionNumber::Compare ( const SemanticVersionNumber a,
const SemanticVersionNumber b 
)
inlinestatic

Compare version numbers "a" and "b"

Parameters
name="a">Firstversion number
name="b">Secondversion number
Returns
-1 if a less than b, 0 if a equals b, 1 if a larger than b

◆ Parse()

bool SemanticVersionNumber::Parse ( const std::string &  vs,
SemanticVersionNumber version 
)
static

Parse string rep of version number

Parameters
verStringString on format MAJOR.MINOR.PATCH[-RELEASESTATE]

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