SemanticVersion Class Reference

Version comparison class based on Semantic Versioning 2.0.0 http://semver.org/ Compares versions and converts versions from string. More...

#include <SemanticVersion.hh>

Public Member Functions

 SemanticVersion ()
 Default constructor. More...
 
 SemanticVersion (const std::string &_v)
 Constructor. More...
 
 SemanticVersion (const SemanticVersion &_copy)
 Copy constructor. More...
 
 SemanticVersion (const unsigned int _major, const unsigned int _minor=0, const unsigned int _patch=0, const std::string &_prerelease="", const std::string &_build="")
 Constructor. More...
 
 ~SemanticVersion ()
 Destructor. More...
 
std::string Build () const
 Get the build metadata string. More...
 
unsigned int Major () const
 Get the major number. More...
 
unsigned int Minor () const
 Get the minor number. More...
 
bool operator!= (const SemanticVersion &_other) const
 Inequality comparison operator. More...
 
bool operator< (const SemanticVersion &_other) const
 Less than comparison operator. More...
 
bool operator<= (const SemanticVersion &_other) const
 Less than or equal comparison operator. More...
 
SemanticVersionoperator= (const SemanticVersion &_other)
 Assignment operator. More...
 
bool operator== (const SemanticVersion &_other) const
 Equality comparison operator. More...
 
bool operator> (const SemanticVersion &_other) const
 Greater than comparison operator. More...
 
bool operator>= (const SemanticVersion &_other) const
 Greater than or equal comparison operator. More...
 
bool Parse (const std::string &_versionStr)
 Parse a version string and set the major, minor, patch numbers, and prerelease and build strings. More...
 
unsigned int Patch () const
 Get the patch number. More...
 
std::string Prerelease () const
 Get the prerelease string. More...
 
std::string Version () const
 Returns the version as a string. More...
 

Friends

std::ostream & operator<< (std::ostream &_out, const SemanticVersion &_v)
 Stream insertion operator. More...
 

Detailed Description

Version comparison class based on Semantic Versioning 2.0.0 http://semver.org/ Compares versions and converts versions from string.


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