[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) |
| Stream output. | |
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.
Definition at line 68 of file Edition.h.
| typedef unsigned zypp::Edition::epoch_t |
| typedef Compare<Edition> zypp::Edition::Compare |
| typedef Range<Edition> zypp::Edition::CompareRange |
| typedef Range<Edition, Match> zypp::Edition::MatchRange |
| zypp::Edition::Edition | ( | ) |
| zypp::Edition::Edition | ( | const std::string & | edition_r | ) |
Ctor taking edition as string.
| INTERNAL | if edition_r does not make a valid Edition. |
Definition at line 237 of file Edition.cc.
| zypp::Edition::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.
| INTERNAL | if version_r or release_r are not valid. |
Definition at line 241 of file Edition.cc.
| zypp::Edition::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.
| INTERNAL | if version_r or release_r epoch_r are not valid. |
Definition at line 247 of file Edition.cc.
| zypp::Edition::~Edition | ( | ) |
| Edition::epoch_t zypp::Edition::epoch | ( | ) | const |
Epoch.
Definition at line 256 of file Edition.cc.
References _pimpl.
Referenced by compare(), zypp::solver::detail::helixXML(), match(), zypp::storage::toXML(), and zypp::syscontent::Writer::Impl::writeXml().
| const std::string & zypp::Edition::version | ( | ) | const |
Version.
Definition at line 259 of file Edition.cc.
References _pimpl.
Referenced by compare(), zypp::solver::detail::helixXML(), match(), zypp::storage::toXML(), and zypp::syscontent::Writer::Impl::writeXml().
| const std::string & zypp::Edition::release | ( | ) | const |
Release.
Definition at line 262 of file Edition.cc.
References _pimpl.
Referenced by compare(), zypp::solver::detail::helixXML(), match(), zypp::storage::toXML(), and zypp::syscontent::Writer::Impl::writeXml().
| std::string zypp::Edition::asString | ( | ) | const |
String representation of Edition.
Definition at line 265 of file Edition.cc.
References _pimpl, and zypp::str::form().
Referenced by zypp::storage::XMLFilesBackend::createProduct(), zypp::storage::XMLFilesBackend::fileNameForNVR(), zypp::parser::susetags::makeSharedIdent(), operator<<(), zypp::capability::parse(), and zypp::target::rpm::RpmDb::pubkeys().
Compare two Editions returning -1,0,1.
-1,0,1 if editions are <,==,>.ANY, use match. Definition at line 286 of file Edition.cc.
References epoch(), release(), zypp::rpmverscmp(), and version().
Referenced by zypp::NVR::compare(), and compare().
| int zypp::Edition::compare | ( | const Edition & | rhs | ) | const [inline] |
Match two Editions returning -1,0,1, treating empty strings as ANY.
-1,0,1 if editions match <,==,>. Definition at line 300 of file Edition.cc.
References epoch(), release(), zypp::rpmverscmp(), and version().
Referenced by match(), and zypp::Edition::Match::operator()().
| int zypp::Edition::match | ( | const Edition & | rhs | ) | const [inline] |
| std::ostream & operator<< | ( | std::ostream & | str, | |
| const Edition & | obj | |||
| ) | [related] |
const epoch_t zypp::Edition::noepoch = 0 [static] |
Value representing noepoch.
Definition at line 75 of file Edition.h.
Referenced by zypp::solver::detail::helixXML(), and zypp::Edition::Impl::validateE().
const Edition zypp::Edition::noedition [static] |
Value representing noedition.
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::storage::XMLFilesBackend::createProduct(), zypp::capability::NamedCap::edition(), zypp::storage::XMLFilesBackend::fileNameForNVR(), zypp::findKernelFlavor(), zypp::target::QueryInstalledEditionHelper::operator()(), zypp::solver::detail::QueueItemRequire::process(), zypp::target::rpm::RpmDb::pubkeyEditions(), zypp::target::rpm::RpmDb::pubkeys(), and zypp::repo::PackageProvider::tryDelta().
RW_pointer<Impl> zypp::Edition::_pimpl [private] |
1.5.3