libept
|
Lightweight Version class that represent a package with a version, with very cheap value copy operations. More...
#include <version.h>
Public Member Functions | |
Version () | |
Create an invalid Version. More... | |
Version (const std::string &name, const std::string &version) | |
Create a Version from strings. More... | |
std::string | name () const |
Return the package name. More... | |
std::string | version () const |
Return the package version, or the empty string if this is a versionless package. More... | |
std::string | upstreamVersion () const |
Return the upstream part of the version. More... | |
bool | isValid () const |
Return true if this package contains a valid value. More... | |
bool | operator== (const Version &pkg) const |
Comparison operators. More... | |
bool | operator!= (const Version &pkg) const |
bool | operator<= (const Version &pkg) const |
bool | operator< (const Version &pkg) const |
bool | operator>= (const Version &pkg) const |
bool | operator> (const Version &pkg) const |
Protected Attributes | |
std::string | m_name |
std::string | m_version |
Lightweight Version class that represent a package with a version, with very cheap value copy operations.
This class can be used to query package information from various information sources. The purpose is create a middle ground that makes sure that all sort of different information sources about packages are referring to the same package.
|
inline |
Create an invalid Version.
|
inline |
Create a Version from strings.
|
inline |
Return true if this package contains a valid value.
Referenced by register_tests().
|
inline |
Return the package name.
References m_name.
Referenced by operator<(), operator<=(), operator>(), operator>=(), ept::apt::Apt::rawRecord(), and ept::apt::Apt::validate().
|
inline |
References m_name, m_version, operator<(), operator<=(), operator>(), and operator>=().
bool ept::apt::Version::operator< | ( | const Version & | pkg | ) | const |
References name(), and version().
Referenced by operator!=().
bool ept::apt::Version::operator<= | ( | const Version & | pkg | ) | const |
References name(), and version().
Referenced by operator!=().
|
inline |
bool ept::apt::Version::operator> | ( | const Version & | pkg | ) | const |
References name(), and version().
Referenced by operator!=().
bool ept::apt::Version::operator>= | ( | const Version & | pkg | ) | const |
References name(), and version().
Referenced by operator!=().
std::string ept::apt::Version::upstreamVersion | ( | ) | const |
Return the upstream part of the version.
Referenced by version().
|
inline |
Return the package version, or the empty string if this is a versionless package.
References m_version, and upstreamVersion().
Referenced by operator<(), operator<=(), operator>(), operator>=(), ept::apt::Apt::rawRecord(), and ept::apt::Apt::validate().
|
protected |
Referenced by name(), operator!=(), and operator==().
|
protected |
Referenced by operator!=(), operator==(), and version().