18#ifndef IGNITION_MATH_SEMANTICVERSION_HH_
19#define IGNITION_MATH_SEMANTICVERSION_HH_
24#include <ignition/math/config.hh>
30 inline namespace IGNITION_MATH_VERSION_NAMESPACE
33 class SemanticVersionPrivate;
66 const unsigned int _minor = 0,
67 const unsigned int _patch = 0,
68 const std::string &_prerelease =
"",
69 const std::string &_build =
"");
78 public:
bool Parse(
const std::string &_versionStr);
86 public:
unsigned int Major()
const;
90 public:
unsigned int Minor()
const;
94 public:
unsigned int Patch()
const;
152#pragma warning(disable: 4251)
155 private: std::unique_ptr<SemanticVersionPrivate> dataPtr;
ignition/math/SemanticVersion.hh
Definition SemanticVersion.hh:41
SemanticVersion(const SemanticVersion &_copy)
Copy constructor.
bool operator<=(const SemanticVersion &_other) const
Less than or equal comparison operator.
unsigned int Minor() const
Get the minor number.
bool Parse(const std::string &_versionStr)
Parse a version string and set the major, minor, patch numbers, and prerelease and build strings.
SemanticVersion & operator=(const SemanticVersion &_other)
Assignment operator.
bool operator>=(const SemanticVersion &_other) const
Greater than or equal comparison operator.
bool operator!=(const SemanticVersion &_other) const
Inequality comparison operator.
SemanticVersion(const std::string &_v)
Constructor.
std::string Prerelease() const
Get the prerelease string.
SemanticVersion()
Default constructor.
SemanticVersion(const unsigned int _major, const unsigned int _minor=0, const unsigned int _patch=0, const std::string &_prerelease="", const std::string &_build="")
Constructor.
friend std::ostream & operator<<(std::ostream &_out, const SemanticVersion &_v)
Stream insertion operator.
Definition SemanticVersion.hh:141
bool operator<(const SemanticVersion &_other) const
Less than comparison operator.
std::string Build() const
Get the build metadata string.
bool operator==(const SemanticVersion &_other) const
Equality comparison operator.
std::string Version() const
Returns the version as a string.
unsigned int Patch() const
Get the patch number.
~SemanticVersion()
Destructor.
unsigned int Major() const
Get the major number.
bool operator>(const SemanticVersion &_other) const
Greater than comparison operator.