61 int compare(
const Version& other)
const;
63 bool operator==(
const Version& other)
const{
return compare(other) == 0;}
64 bool operator!=(
const Version& other)
const{
return compare(other) != 0;}
65 bool operator<(
const Version& other)
const{
return compare(other) < 0;}
66 bool operator>(
const Version& other)
const{
return compare(other) > 0;}
67 bool operator<=(
const Version& other)
const{
return compare(other) <= 0;}
68 bool operator>=(
const Version& other)
const{
return compare(other) >= 0;}
71 bool valid()
const{
return major_ > 0;}
73 int major()
const{
return major_;}
74 void setMajor(
int major){major_ = major;}
76 int minor()
const{
return minor_;}
77 void setMinor(
int minor){minor_ = minor;}
79 int patch()
const{
return patch_;}
80 void setPatch(
int patch){patch_ = patch;}
82 const std::string& prerelease()
const{
return prerelease_;}
83 void setPrerelease(StringView prerelease){prerelease_ = std::string(prerelease);}
85 const std::string& build()
const{
return build_;}
86 void setBuild(StringView build){build_ = std::string(build);}
92 std::string prerelease_;