17 #ifndef LIBPKG_VERSION 18 #define LIBPKG_VERSION 41 string _upstream_version;
44 string _package_version;
68 version(string::const_iterator first,string::const_iterator last);
85 operator string()
const;
97 {
return _upstream_version; }
103 {
return _package_version; }
109 void parse(string::const_iterator first,string::const_iterator last);
115 void validate()
const;
162 public std::runtime_error
string epoch() const
Get epoch.
Definition: version.h:90
version()
Construct version with default value.
Definition: libpkg/version.cc:193
The namespace used to hold the package management library.
Definition: auto_dir.cc:23
bool operator<(const binary_control_table::key_type &lhs, const binary_control_table::key_type &rhs)
Compare two binary control table keys.
Definition: binary_control_table.cc:138
string upstream_version() const
Get upstream version.
Definition: version.h:96
bool operator<=(const version &lhs, const version &rhs)
Test whether one version is less than or equal to another.
Definition: libpkg/version.cc:318
bool operator>=(const version &lhs, const version &rhs)
Test whether one version is greater than or equal to another.
Definition: libpkg/version.cc:313
string package_version() const
Get package version.
Definition: version.h:102
An exception class for reporting parse errors.
Definition: version.h:161
bool operator>(const version &lhs, const version &rhs)
Test whether one version is greater than another.
Definition: libpkg/version.cc:323
A class to represent a package version.
Definition: version.h:32
bool operator!=(const status &lhs, const status &rhs)
Test whether two status records are unequal.
Definition: status.cc:119
bool operator==(const status &lhs, const status &rhs)
Test whether two status records are equal.
Definition: status.cc:111