#include <PoolQueryResult.h>
Public Types | |
typedef std::tr1::unordered_set < sat::Solvable > | ResultSet |
typedef ResultSet::size_type | size_type |
typedef ResultSet::const_iterator | const_iterator |
Public Member Functions | |
PoolQueryResult () | |
Default ctor (empty result). | |
PoolQueryResult (sat::Solvable result_r) | |
Ctor adding one sat::Solvable. | |
PoolQueryResult (const PoolItem &result_r) | |
Ctor adding one PoolItem. | |
PoolQueryResult (const PoolQuery &query_r) | |
Ctor adding one PoolQuery result. | |
template<class _QueryResultIter > | |
PoolQueryResult (_QueryResultIter begin_r, _QueryResultIter end_r) | |
Ctor adding a range of items for which operator+= is defined. | |
bool | empty () const |
Whether the result is empty. | |
size_type | size () const |
The number of sat::Solvables. | |
const_iterator | begin () const |
const_iterator | end () const |
bool | contains (sat::Solvable result_r) const |
Test whether some item is in the result set. | |
bool | contains (const PoolItem &result_r) const |
void | clear () |
Clear the result. | |
PoolQueryResult & | operator+= (const PoolQueryResult &query_r) |
Add items to the result. | |
PoolQueryResult & | operator+= (const PoolQuery &query_r) |
PoolQueryResult & | operator+= (sat::Solvable result_r) |
PoolQueryResult & | operator+= (const PoolItem &result_r) |
PoolQueryResult & | operator-= (const PoolQueryResult &query_r) |
Remove Items from the result. | |
PoolQueryResult & | operator-= (const PoolQuery &query_r) |
PoolQueryResult & | operator-= (sat::Solvable result_r) |
PoolQueryResult & | operator-= (const PoolItem &result_r) |
PoolQueryResult | operator+ (const PoolQueryResult &query_r) const |
Combine results. | |
PoolQueryResult | operator+ (const PoolQuery &query_r) const |
PoolQueryResult | operator+ (sat::Solvable result_r) const |
PoolQueryResult | operator- (const PoolQueryResult &query_r) const |
Intersect results. | |
PoolQueryResult | operator- (const PoolQuery &query_r) const |
PoolQueryResult | operator- (sat::Solvable result_r) const |
Private Attributes | |
ResultSet | _result |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const PoolQueryResult &obj) |
value_type
sat::Solvable or PoolItem or PoolQuery or any type that fits operator+=
.
// Constructed from PoolItem iterator pair PoolQueryResult result( pool.byKindBegin<Package>(), pool.byKindEnd<Package>() ); MIL << result.size() << endl; { // Removing a PoolQuery result PoolQuery q; q.addAttribute( sat::SolvAttr::name, "[a-zA-Z]*" ); q.setMatchGlob(); result -= q; MIL << result.size() << endl; } MIL << result << endl; // Removing a range of sat::Solvables sat::WhatProvides poviders( Capability("3ddiag") ); result -= PoolQueryResult( poviders.begin(), poviders.end() ); // packages not starting with a letter, except 3ddiag MIL << result << endl;
Definition at line 75 of file PoolQueryResult.h.
typedef std::tr1::unordered_set<sat::Solvable> zypp::PoolQueryResult::ResultSet |
Definition at line 78 of file PoolQueryResult.h.
typedef ResultSet::size_type zypp::PoolQueryResult::size_type |
Reimplemented from zypp::sat::SolvIterMixin< PoolQueryResult, std::tr1::unordered_set< sat::Solvable >::const_iterator >.
Definition at line 79 of file PoolQueryResult.h.
typedef ResultSet::const_iterator zypp::PoolQueryResult::const_iterator |
Definition at line 80 of file PoolQueryResult.h.
zypp::PoolQueryResult::PoolQueryResult | ( | ) | [inline] |
Default ctor (empty result).
Definition at line 84 of file PoolQueryResult.h.
Referenced by operator+(), and operator-().
zypp::PoolQueryResult::PoolQueryResult | ( | sat::Solvable | result_r | ) | [inline, explicit] |
Ctor adding one sat::Solvable.
Definition at line 88 of file PoolQueryResult.h.
References operator+=().
zypp::PoolQueryResult::PoolQueryResult | ( | const PoolItem & | result_r | ) | [inline, explicit] |
zypp::PoolQueryResult::PoolQueryResult | ( | const PoolQuery & | query_r | ) | [inline, explicit] |
Ctor adding one PoolQuery result.
Definition at line 96 of file PoolQueryResult.h.
References operator+=().
zypp::PoolQueryResult::PoolQueryResult | ( | _QueryResultIter | begin_r, | |
_QueryResultIter | end_r | |||
) | [inline] |
Ctor adding a range of items for which operator+= is defined.
Definition at line 101 of file PoolQueryResult.h.
References for_, and operator+=().
bool zypp::PoolQueryResult::empty | ( | ) | const [inline] |
Whether the result is empty.
Reimplemented from zypp::sat::SolvIterMixin< PoolQueryResult, std::tr1::unordered_set< sat::Solvable >::const_iterator >.
Definition at line 111 of file PoolQueryResult.h.
References _result.
Referenced by operator+=().
size_type zypp::PoolQueryResult::size | ( | ) | const [inline] |
The number of sat::Solvables.
Reimplemented from zypp::sat::SolvIterMixin< PoolQueryResult, std::tr1::unordered_set< sat::Solvable >::const_iterator >.
Definition at line 114 of file PoolQueryResult.h.
References _result.
Referenced by zypp::pool::PoolImpl::reapplyHardLocks(), and zypp::pool::PoolImpl::setHardLockQueries().
const_iterator zypp::PoolQueryResult::begin | ( | ) | const [inline] |
Definition at line 117 of file PoolQueryResult.h.
References _result.
Referenced by operator+=(), operator-=(), and zypp::operator<<().
const_iterator zypp::PoolQueryResult::end | ( | ) | const [inline] |
Definition at line 120 of file PoolQueryResult.h.
References _result.
Referenced by operator+=(), operator-=(), and zypp::operator<<().
bool zypp::PoolQueryResult::contains | ( | sat::Solvable | result_r | ) | const [inline] |
Test whether some item is in the result set.
Definition at line 124 of file PoolQueryResult.h.
References _result.
Referenced by zypp::pool::PoolImpl::reapplyHardLocks(), and zypp::pool::PoolImpl::setHardLockQueries().
bool zypp::PoolQueryResult::contains | ( | const PoolItem & | result_r | ) | const [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 127 of file PoolQueryResult.h.
References contains(), and zypp::PoolItem::satSolvable().
Referenced by contains().
void zypp::PoolQueryResult::clear | ( | ) | [inline] |
Clear the result.
Definition at line 132 of file PoolQueryResult.h.
References _result.
Referenced by operator-=().
PoolQueryResult& zypp::PoolQueryResult::operator+= | ( | const PoolQueryResult & | query_r | ) | [inline] |
Add items to the result.
Definition at line 136 of file PoolQueryResult.h.
References _result, begin(), empty(), and end().
Referenced by PoolQueryResult().
PoolQueryResult& zypp::PoolQueryResult::operator+= | ( | const PoolQuery & | query_r | ) | [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 143 of file PoolQueryResult.h.
References _result, zypp::PoolQuery::begin(), zypp::PoolQuery::end(), and for_.
PoolQueryResult& zypp::PoolQueryResult::operator+= | ( | sat::Solvable | result_r | ) | [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 155 of file PoolQueryResult.h.
References _result.
PoolQueryResult& zypp::PoolQueryResult::operator+= | ( | const PoolItem & | result_r | ) | [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 161 of file PoolQueryResult.h.
References _result, and zypp::PoolItem::satSolvable().
PoolQueryResult& zypp::PoolQueryResult::operator-= | ( | const PoolQueryResult & | query_r | ) | [inline] |
PoolQueryResult& zypp::PoolQueryResult::operator-= | ( | const PoolQuery & | query_r | ) | [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 178 of file PoolQueryResult.h.
References _result, zypp::PoolQuery::begin(), zypp::PoolQuery::end(), and for_.
PoolQueryResult& zypp::PoolQueryResult::operator-= | ( | sat::Solvable | result_r | ) | [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 190 of file PoolQueryResult.h.
References _result.
PoolQueryResult& zypp::PoolQueryResult::operator-= | ( | const PoolItem & | result_r | ) | [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 196 of file PoolQueryResult.h.
References _result, and zypp::PoolItem::satSolvable().
PoolQueryResult zypp::PoolQueryResult::operator+ | ( | const PoolQueryResult & | query_r | ) | const [inline] |
PoolQueryResult zypp::PoolQueryResult::operator+ | ( | const PoolQuery & | query_r | ) | const [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 207 of file PoolQueryResult.h.
References PoolQueryResult().
PoolQueryResult zypp::PoolQueryResult::operator+ | ( | sat::Solvable | result_r | ) | const [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 210 of file PoolQueryResult.h.
References PoolQueryResult().
PoolQueryResult zypp::PoolQueryResult::operator- | ( | const PoolQueryResult & | query_r | ) | const [inline] |
PoolQueryResult zypp::PoolQueryResult::operator- | ( | const PoolQuery & | query_r | ) | const [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 217 of file PoolQueryResult.h.
References PoolQueryResult().
PoolQueryResult zypp::PoolQueryResult::operator- | ( | sat::Solvable | result_r | ) | const [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 220 of file PoolQueryResult.h.
References PoolQueryResult().
std::ostream & operator<< | ( | std::ostream & | str, | |
const PoolQueryResult & | obj | |||
) | [related] |
Stream output
Definition at line 28 of file PoolQueryResult.cc.
ResultSet zypp::PoolQueryResult::_result [private] |
Definition at line 224 of file PoolQueryResult.h.
Referenced by begin(), clear(), contains(), empty(), end(), operator+=(), operator-=(), and size().