18#ifndef GAZEBO_COMMON_SEMANTICVERSION_HH_
19#define GAZEBO_COMMON_SEMANTICVERSION_HH_
30 class SemanticVersionPrivate;
64 const unsigned int _minor = 0,
65 const unsigned int _patch = 0,
66 const std::string &_prerelease =
"",
67 const std::string &_build =
"");
76 public:
bool Parse(
const std::string &_versionStr);
84 public:
unsigned int Major()
const;
88 public:
unsigned int Minor()
const;
92 public:
unsigned int Patch()
const;
147 private: std::unique_ptr<SemanticVersionPrivate> dataPtr;
common
Definition FuelModelDatabase.hh:37
Version comparison class based on Semantic Versioning 2.0.0 http://semver.org/ Compares versions and ...
Definition SemanticVersion.hh:39
unsigned int Major() const
Get the major number.
SemanticVersion(const unsigned int _major, const unsigned int _minor=0, const unsigned int _patch=0, const std::string &_prerelease="", const std::string &_build="")
Constructor.
SemanticVersion(const SemanticVersion &_copy)
Copy constructor.
SemanticVersion & operator=(const SemanticVersion &_other)
Assignment operator.
~SemanticVersion()
Destructor.
bool operator<=(const SemanticVersion &_other) const
Less than or equal comparison operator.
bool operator<(const SemanticVersion &_other) const
Less than comparison operator.
SemanticVersion(const std::string &_v)
Constructor.
unsigned int Patch() const
Get the patch number.
bool operator>(const SemanticVersion &_other) const
Greater than comparison operator.
bool operator==(const SemanticVersion &_other) const
Equality comparison operator.
SemanticVersion()
Default constructor.
friend std::ostream & operator<<(std::ostream &_out, const SemanticVersion &_v)
Stream insertion operator.
Definition SemanticVersion.hh:139
unsigned int Minor() const
Get the minor number.
std::string Version() const
Returns the version as a string.
std::string Prerelease() const
Get the prerelease string.
std::string Build() const
Get the build metadata string.
bool operator!=(const SemanticVersion &_other) const
Inequality comparison operator.
bool Parse(const std::string &_versionStr)
Parse a version string and set the major, minor, patch numbers, and prerelease and build strings.
bool operator>=(const SemanticVersion &_other) const
Greater than or equal comparison operator.
Forward declarations for the common classes.
Definition Animation.hh:27