Go to the documentation of this file.
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);
80 public: std::string Version()
const;
84 public:
unsigned int Major()
const;
88 public:
unsigned int Minor()
const;
92 public:
unsigned int Patch()
const;
97 public: std::string Prerelease()
const;
103 public: std::string Build()
const;
147 private: std::unique_ptr<SemanticVersionPrivate> dataPtr;
unsigned int Minor() const
Get the minor number.
Forward declarations for the common classes.
Definition: Animation.hh:26
common
Definition: FuelModelDatabase.hh:37
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
Equality comparison operator.
bool operator<(const SemanticVersion &_other) const
Less than comparison operator.
unsigned int Major() const
Get the major number.
bool operator>(const SemanticVersion &_other) const
Greater than comparison operator.
friend std::ostream & operator<<(std::ostream &_out, const SemanticVersion &_v)
Stream insertion operator.
Definition: SemanticVersion.hh:139
unsigned int Patch() const
Get the patch number.
SemanticVersion & operator=(const SemanticVersion &_other)
Assignment operator.
~SemanticVersion()
Destructor.
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
Greater than or equal comparison operator.
bool operator!=(const SemanticVersion &_other) const
Inequality comparison operator.
SemanticVersion()
Default constructor.
bool operator<=(const SemanticVersion &_other) const
Less than or equal comparison operator.
Version comparison class based on Semantic Versioning 2.0.0 http://semver.org/ Compares versions and ...
Definition: SemanticVersion.hh:38