libzypp
10.5.0
|
Container of Solvable providing a Capability (read only). More...
#include <WhatProvides.h>
Classes | |
class | Impl |
WhatProvides implementation date. More... | |
Public Types | |
typedef Solvable | value_type |
typedef unsigned | size_type |
typedef detail::WhatProvidesIterator | const_iterator |
Public Member Functions | |
WhatProvides () | |
Default ctor. | |
WhatProvides (Capability cap_r) | |
Ctor from Capability. | |
WhatProvides (Capabilities caps_r) | |
Ctor collecting all providers of capabilities in caps_r . | |
WhatProvides (const CapabilitySet &caps_r) | |
Ctor collecting all providers of capabilities in caps_r . | |
bool | empty () const |
Whether the container is empty. | |
size_type | size () const |
Number of solvables inside. | |
const_iterator | begin () const |
Iterator pointing to the first Solvable. | |
const_iterator | end () const |
Iterator pointing behind the last Solvable. | |
Private Attributes | |
RW_pointer< Impl > | _pimpl |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const WhatProvides &obj) |
Container of Solvable providing a Capability (read only).
Capability cap("amarok < 1.13"); WhatProvides q( cap ); Solvable firstMatch; if ( ! q.empty() ) { cout << "Found " << q.size() << " matches for " << cap << ":" << endl; firstMatch = *q.begin(); for_( it, q.begin(), q.end() ) cout << *it << endl; } if ( firstMatch ) { WhatProvides req( firstMatch.requires() ); if ( ! req.empty() ) { cout << "Found " << req.size() << " items providing requirements of " << firstMatch << ":" << endl; } }
rpmlib(PayloadIsBzip2) <= 3.0.5-1
isSystem
set true
, although there should never be a Solvable::noSolvable returned with isSystem
set false
. If so, please file a bugreport. WhatProvides q( Capability("rpmlib(PayloadIsBzip2) <= 3.0.5-1") ); for_( it, q.begin(), q.end() ) { if ( *it ) cout << "Capability is provided by package " << *it << endl; else if ( it->isSystem() ) cout << "Capability is a system property" << endl; else ; // never reaching this \c else }
Definition at line 87 of file WhatProvides.h.
Definition at line 91 of file WhatProvides.h.
typedef unsigned zypp::sat::WhatProvides::size_type |
Reimplemented from zypp::sat::SolvIterMixin< WhatProvides, detail::WhatProvidesIterator >.
Definition at line 92 of file WhatProvides.h.
Definition at line 118 of file WhatProvides.h.
zypp::sat::WhatProvides::WhatProvides | ( | ) |
Default ctor.
Definition at line 94 of file WhatProvides.cc.
zypp::sat::WhatProvides::WhatProvides | ( | Capability | cap_r | ) | [explicit] |
Ctor from Capability.
Definition at line 97 of file WhatProvides.cc.
zypp::sat::WhatProvides::WhatProvides | ( | Capabilities | caps_r | ) | [explicit] |
Ctor collecting all providers of capabilities in caps_r
.
Definition at line 107 of file WhatProvides.cc.
zypp::sat::WhatProvides::WhatProvides | ( | const CapabilitySet & | caps_r | ) | [explicit] |
Ctor collecting all providers of capabilities in caps_r
.
Definition at line 118 of file WhatProvides.cc.
bool zypp::sat::WhatProvides::empty | ( | ) | const |
Whether the container is empty.
Reimplemented from zypp::sat::SolvIterMixin< WhatProvides, detail::WhatProvidesIterator >.
Definition at line 129 of file WhatProvides.cc.
WhatProvides::size_type zypp::sat::WhatProvides::size | ( | ) | const |
Number of solvables inside.
Reimplemented from zypp::sat::SolvIterMixin< WhatProvides, detail::WhatProvidesIterator >.
Definition at line 134 of file WhatProvides.cc.
WhatProvides::const_iterator zypp::sat::WhatProvides::begin | ( | ) | const |
Iterator pointing to the first Solvable.
Definition at line 145 of file WhatProvides.cc.
WhatProvides::const_iterator zypp::sat::WhatProvides::end | ( | ) | const [inline] |
Iterator pointing behind the last Solvable.
Definition at line 226 of file WhatProvides.h.
std::ostream & operator<< | ( | std::ostream & | str, |
const WhatProvides & | obj | ||
) | [related] |
Stream output
Definition at line 162 of file WhatProvides.cc.
RW_pointer<Impl> zypp::sat::WhatProvides::_pimpl [private] |
Definition at line 127 of file WhatProvides.h.