[zypp-devel] SolvIterMixin: Adding PoolItem_iterator and Selectable_iterator
I just added a class SolvIterMixin (zypp/sat/SolvIterMixin.h).
Classes providing a sat::Solvable iterator - i.e methods begin() and end()
returning an iterator pointing to sat::Solvable - may derive from it to
add additional iterators. by now:
// value_type sat::Solvable (the same as the derived class' begin/end)
Solvable_iterator solvableBegin() const
Solvable_iterator solvableEnd() const
// value_type PoolItem
PoolItem_iterator poolItemBegin() const
PoolItem_iterator poolItemEnd() const
// value_type ui::Selectable::Ptr
Selectable_iterator selectableBegin() const
Selectable_iterator selectableEnd() const
(The Selectable_iterator will soon be enhanced to avoid multiple visits of
the same Selectable, because multiple Solvables/PoolItems refer to the
same Selectable.)
The intention is that all classes providing a collection of solvables
(Queries, Pattern/Patch contents, ...) offer this interface.
To use SolvIterMixin derive from it and pass the class and the iterator
type as template argument:
* namespace detail
* {
* class WhatProvidesIterator;
* }
*
* class WhatProvides
* : public SolvIterMixin
On Wed, Apr 09, Michael Andres wrote:
I just added a class SolvIterMixin (zypp/sat/SolvIterMixin.h).
Selectable_iterator selectableBegin() const Selectable_iterator selectableEnd() const
(The Selectable_iterator will soon be enhanced to avoid multiple visits of the same Selectable, because multiple Solvables/PoolItems refer to the same Selectable.)
This is done in zypp SVN rev. 9531. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres YaST Development ma@novell.com SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (1)
-
Michael Andres