libzypp 17.31.23
|
PoolQuery iterator as returned by PoolQuery::begin. More...
#include <PoolQuery.h>
Public Types | |
typedef Matches::size_type | size_type |
typedef Matches::const_iterator | matches_iterator |
Public Member Functions | |
PoolQueryIterator () | |
Default ctor is also end . | |
PoolQueryIterator (const shared_ptr< PoolQueryMatcher > &matcher_r) | |
\Ref PoolQuery ctor. | |
Private Types | |
typedef std::vector< sat::LookupAttr::iterator > | Matches |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const PoolQueryIterator &obj) |
Stream output. | |
std::ostream & | dumpOn (std::ostream &str, const PoolQueryIterator &obj) |
Detailed stream output. | |
Detailed inspection of attribute matches within the current Solvable. | |
The matches_iterator visits all attribute matches within the current Solvable, providing a sat::LookupAttr::iterator pointing to attribute. While a matches_iterator itself becomes invalid if the PoolQueryIterator is advanced, the sat::LookupAttr::iterator it pointed to stays valid, even after the query ended. // Setup query for "libzypp" in name or requires:
PoolQuery q;
q.addString( "libzypp" );
q.setMatchSubstring();
q.setCaseSensitive( false );
q.addDependency( sat::SolvAttr::requires );
// Iterate the result:
{
sat::Solvable solvable( *solvIter );
cout << "Found matches in " << solvable << endl;
if ( verbose )
for_( attrIter, solvIter.matchesBegin(), solvIter.matchesEnd() )
{
sat::LookupAttr::iterator attr( *attrIter );
}
}
Found matches in PackageKit-0.3.11-1.12.i586(@System)
solvable:requires "libzypp.so.523"
Found matches in libqdialogsolver1-1.2.6-1.1.2.i586(@System)
solvable:requires "libzypp.so.523"
solvable:requires "libzypp >= 5.25.3-0.1.2"
Found matches in libzypp-5.30.3-0.1.1.i586(@System)
solvable:name "libzypp"
Found matches in libzypp-testsuite-tools-4.2.6-8.1.i586(@System)
solvable:name "libzypp-testsuite-tools"
solvable:requires "libzypp.so.523"
...
void setCaseSensitive(bool value=true) Turn case sentitivity on or off (unsets or sets SEARCH_NOCASE flag). Definition: PoolQuery.cc:1018 void addAttribute(const sat::SolvAttr &attr, const std::string &value="") Filter by the value of the specified attr attribute. Definition: PoolQuery.cc:884 const_iterator end() const An iterator pointing to the end of the query result. Definition: PoolQuery.h:624 void addDependency(const sat::SolvAttr &attr, const std::string &name, const Rel &op, const Edition &edition) Query "name|global op edition". Definition: PoolQuery.cc:887 const Matches & matches() const Definition: PoolQuery.cc:1815 | |
class | boost::iterator_core_access |
shared_ptr< PoolQueryMatcher > | _matcher |
shared_ptr< Matches > | _matches |
bool | matchesEmpty () const |
False unless this is the end iterator. | |
size_type | matchesSize () const |
Number of attribute matches. | |
matches_iterator | matchesBegin () const |
Begin of matches. | |
matches_iterator | matchesEnd () const |
End of matches. | |
sat::Solvable | dereference () const |
void | increment () |
const Matches & | matches () const |
PoolQuery iterator as returned by PoolQuery::begin.
The PoolQueryIterator visits sat::Solavables that do contain matches.
But it also provides an iterator by itself, to allow a detailed inspection of the individual attribute matches within the current Solvable.
Definition at line 519 of file PoolQuery.h.
|
private |
Definition at line 527 of file PoolQuery.h.
typedef Matches::size_type zypp::detail::PoolQueryIterator::size_type |
Definition at line 529 of file PoolQuery.h.
typedef Matches::const_iterator zypp::detail::PoolQueryIterator::matches_iterator |
Definition at line 530 of file PoolQuery.h.
|
inline |
Default ctor is also end
.
Definition at line 533 of file PoolQuery.h.
|
inline |
\Ref PoolQuery ctor.
Definition at line 537 of file PoolQuery.h.
|
inline |
False
unless this is the end
iterator.
Definition at line 587 of file PoolQuery.h.
|
inline |
Number of attribute matches.
Definition at line 589 of file PoolQuery.h.
|
inline |
Begin of matches.
Definition at line 591 of file PoolQuery.h.
|
inline |
End of matches.
Definition at line 593 of file PoolQuery.h.
|
inlineprivate |
Definition at line 599 of file PoolQuery.h.
|
private |
Definition at line 1802 of file PoolQuery.cc.
|
private |
Definition at line 1815 of file PoolQuery.cc.
|
friend |
Definition at line 597 of file PoolQuery.h.
|
related |
Stream output.
Definition at line 614 of file PoolQuery.h.
|
related |
Detailed stream output.
Definition at line 1832 of file PoolQuery.cc.
|
private |
Definition at line 608 of file PoolQuery.h.
|
mutableprivate |
Definition at line 609 of file PoolQuery.h.