A basic semantic versioning library

Dependents:   BLE_Display

Embed: (wiki syntax)

« Back to documentation index

SemVer Class Reference

SemVer Class Reference

A basic implementation of semantic versioning. More...

#include <SemVer.h>

Public Member Functions

 SemVer (const std::string &version)
 SemVer constructor.
const std::string & getVersion () const
 Get full version.
const int & getMajor () const
 Get the major of the version.
const int & getMinor () const
 Get the minor of the version.
const int & getPatch () const
 Get the patch of the version.
const bool & isValid () const
 Check if the version is valid.

Detailed Description

A basic implementation of semantic versioning.

Definition at line 15 of file SemVer.h.


Constructor & Destructor Documentation

SemVer ( const std::string &  version )

SemVer constructor.

Parameters:
versionstring to parse as a version

Definition at line 22 of file SemVer.h.


Member Function Documentation

const int& getMajor (  ) const

Get the major of the version.

Definition at line 53 of file SemVer.h.

const int& getMinor (  ) const

Get the minor of the version.

Definition at line 61 of file SemVer.h.

const int& getPatch (  ) const

Get the patch of the version.

Definition at line 69 of file SemVer.h.

const std::string& getVersion (  ) const

Get full version.

Definition at line 45 of file SemVer.h.

const bool& isValid (  ) const

Check if the version is valid.

Definition at line 77 of file SemVer.h.