[zypp-devel] zypp::PoolQueryResult - Helper class to collect (not only) PoolQuery results.
Added class zypp::PoolQueryResult /** Helper class to collect (not only) PoolQuery results. * * \note Unfortunately PoolQuery::begin might throw. Exceptions * are caught and the query is treated as empty. * * PoolQueryResult maintains a set of sat::Solvable. You can * add/remove solvables to/from the set defined by: * * \li a single sat::Solvable * \li a single PoolItem * \li a PoolQuery * \li an other PoolQueryResult * \li any iterator pair with value_type sat::Solvable * or PoolItem or PoolQuery or any type that fits * operator+=. * * The class is a sat::SolvIterMixin, so you can iterate the result * not just as sat::Solvable, but also as PoolItem or * ui::Selectable. * * \code * // 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; * \endcode */ -- 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