[epoch:]version[-release]
.
More...
#include <Edition.h>
Public Types | |
typedef unsigned | epoch_t |
Type of an epoch. | |
typedef Compare< Edition > | Compare |
compare functor. | |
typedef Range< Edition > | CompareRange |
Edition Range based on Compare. | |
typedef Range< Edition, Match > | MatchRange |
Edition Range based on Match. | |
Public Member Functions | |
Edition () | |
Default ctor: noedition. | |
Edition (const std::string &edition_r) | |
Ctor taking edition as string. | |
Edition (const std::string &version_r, const std::string &release_r, epoch_t epoch_r=noepoch) | |
Ctor taking version_r, release_r and optional epoch_r. | |
Edition (const std::string &version_r, const std::string &release_r, const std::string &epoch_r) | |
Ctor taking version_r, release_r and optional epoch_r as string. | |
~Edition () | |
Dtor. | |
epoch_t | epoch () const |
Epoch. | |
const std::string & | version () const |
Version. | |
const std::string & | release () const |
Release. | |
std::string | asString () const |
String representation of Edition. | |
int | compare (const Edition &rhs) const |
int | match (const Edition &rhs) const |
Static Public Member Functions | |
static int | compare (const Edition &lhs, const Edition &rhs) |
Compare two Editions returning -1,0,1 . | |
static int | match (const Edition &lhs, const Edition &rhs) |
Match two Editions returning -1,0,1 , treating empty strings as ANY . | |
Static Public Attributes | |
static const epoch_t | noepoch = 0 |
Value representing noepoch . | |
static const Edition | noedition |
Value representing noedition . | |
Private Attributes | |
RW_pointer< Impl > | _pimpl |
Pointer to implementation. | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const Edition &obj) |
Comaprison based on epoch, version, and release. | |
bool | operator== (const Edition &lhs, const Edition &rhs) |
bool | operator!= (const Edition &lhs, const Edition &rhs) |
bool | operator< (const Edition &lhs, const Edition &rhs) |
bool | operator<= (const Edition &lhs, const Edition &rhs) |
bool | operator> (const Edition &lhs, const Edition &rhs) |
bool | operator>= (const Edition &lhs, const Edition &rhs) |
Classes | |
struct | Impl |
Edition implementation. More... | |
struct | Match |
match functor. More... |
[epoch:]version[-release]
.
epoch
(optional) number, Edition::noepoch if not supplied version
(required) string, may not contain '-' release
(optional) string, may not contain '-'
epoch
, then version
, then release
. Version and release strings are compared by splitting them into segments of alpha or digit sequences. Segments are compared according to their type. On mixed types a string compares less than a number. 1.0
and 1_0
compare equal in the example.Edition::match compares two editions, treating empty version or release strings as wildcard. Thus match is not transitive, and you don't want to use it to order keys in a a std::container.
optimize implementation(e.g don't store epoch if noepoch)
implement debian comparison and make choice backend specific
optimize noedition. unified Impl and quick check in compare.
Definition at line 68 of file Edition.h.
|
Type of an epoch.
|
|
compare functor.
|
|
Edition Range based on Compare.
|
|
|
|
Default ctor: noedition.
Definition at line 236 of file Edition.cc. |
|
Ctor taking edition as string.
Definition at line 240 of file Edition.cc. |
|
Ctor taking version_r, release_r and optional epoch_r.
Definition at line 244 of file Edition.cc. |
|
Ctor taking version_r, release_r and optional epoch_r as string.
Definition at line 250 of file Edition.cc. |
|
Dtor.
Definition at line 256 of file Edition.cc. |
|
Epoch.
Definition at line 259 of file Edition.cc. References _pimpl. |
|
Version.
Definition at line 262 of file Edition.cc. References _pimpl. Referenced by compare(), match(), and zypp::storage::toXML(). |
|
Release.
Definition at line 265 of file Edition.cc. References _pimpl. Referenced by compare(), match(), and zypp::storage::toXML(). |
|
String representation of Edition.
Definition at line 268 of file Edition.cc. References _pimpl, and zypp::str::form(). Referenced by operator<<(). |
|
Compare two Editions returning
Definition at line 289 of file Edition.cc. References epoch(), release(), zypp::rpmverscmp(), and version(). Referenced by zypp::NVR::compare(), and compare(). |
|
Definition at line 134 of file Edition.h. References compare(). |
|
Match two Editions returning
Definition at line 303 of file Edition.cc. References epoch(), release(), zypp::rpmverscmp(), and version(). Referenced by match(), and zypp::Edition::Match::operator()(). |
|
Definition at line 155 of file Edition.h. References match(). |
|
Stream output. Definition at line 181 of file Edition.h. References asString(). |
|
Definition at line 187 of file Edition.h. References zypp::compareByRel(), and zypp::Rel::EQ. |
|
Definition at line 191 of file Edition.h. References zypp::compareByRel(), and zypp::Rel::NE. |
|
Definition at line 195 of file Edition.h. References zypp::compareByRel(), and zypp::Rel::LT. |
|
Definition at line 199 of file Edition.h. References zypp::compareByRel(), and zypp::Rel::LE. |
|
Definition at line 203 of file Edition.h. References zypp::compareByRel(), and zypp::Rel::GT. |
|
Definition at line 207 of file Edition.h. References zypp::compareByRel(), and zypp::Rel::GE. |
|
Value representing
Definition at line 75 of file Edition.h. Referenced by zypp::Edition::Impl::validateE(). |
|
Value representing This is in fact a valid Edition. It's what the default ctor creates or will be parsed from an empty string. Definition at line 81 of file Edition.h. Referenced by zypp::source::yum::YUMSourceImpl::createGroup(), zypp::capability::CapabilityImpl::edition(), zypp::target::rpm::RpmDb::fileList(), zypp::storage::XMLFilesBackend::fileNameForResolvable(), zypp::CapFactory::Impl::isEditionSpec(), zypp::target::rpm::RpmDb::pubkeyEditions(), and zypp::target::rpm::RpmDb::pubkeys(). |
|
Pointer to implementation.
Definition at line 174 of file Edition.h. Referenced by asString(), epoch(), release(), and version(). |