#include <PkgSet.h>
Public Types | |
typedef std::map< PkgName, PMSolvablePtr > | PkgList_type |
typedef PkgList_type::iterator | iterator |
typedef PkgList_type::const_iterator | const_iterator |
typedef std::list< PkgRevRelation > | RevRelList_type |
typedef RevRelList_type::iterator | RevRelList_iterator |
typedef RevRelList_type::const_iterator | RevRelList_const_iterator |
typedef std::map< PkgName, RevRelList_type > | InvRel_type |
typedef InvRel_type::iterator | InvRel_iterator |
typedef InvRel_type::const_iterator | InvRel_const_iterator |
typedef PMSolvable::PkgRelList_type &(* | getAdditionalProvides_callback )(constPMSolvablePtr ptr) |
typedef std::list< constPMSolvablePtr > | SolvableList |
Public Member Functions | |
PkgSet () | |
~PkgSet () | |
bool | empty () const |
unsigned | size () const |
void | add (PMSolvablePtr pkg, bool force=false) |
void | remove (PMSolvablePtr pkg) |
void | remove (PkgName name) |
void | new_provides (PMSolvablePtr pkg, const PkgRelation &prov) |
PMSolvablePtr | lookup (const PkgName &name) const |
PMSolvablePtr | operator[] (const PkgName &name) const |
bool | includes (const PkgName &name) const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const InvRel_type & | required () const |
const InvRel_type & | conflicted () const |
const InvRel_type & | provided () const |
const InvRel_type & | obsoleted () const |
decl_InvRel_iterators (required) decl_InvRel_iterators(conflicted) decl_InvRel_iterators(provided) decl_InvRel_iterators(obsoleted) void setAdditionalProvidesCallback(getAdditionalProvides_callback callback) | |
getAdditionalProvides_callback | AdditionalProvidesCallback () const |
std::ostream & | dumpOn (std::ostream &os) |
Static Public Member Functions | |
const RevRelList_type & | getRevRelforPkg (const InvRel_type &, const PkgName &) |
Private Attributes | |
PkgList_type | contents |
InvRel_type | _required |
InvRel_type | _conflicted |
InvRel_type | _provided |
InvRel_type | _obsoleted |
getAdditionalProvides_callback | _additionalprovides_callback |
Additionally to compounding packages, has one more important feature for dependency checking: It maintains reverse indices of all package relations. I.e., you can ask the set what packages (e.g.) require or provide a certain name. These reverse indices are the core of an efficient dependency and consistency checking.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Adds a package to the set. If force is false, the package is added only if no equal or newer edition is already member of the set. This is handy most of the time, but can be overridden by passing true as second parameter. Then pkg is always added, replacing a previous member of the set with the same name. |
|
return current callback |
|
|
|
|
|
|
|
set callback function which is called when Packages are added to this set |
|
|
|
|
|
|
|
|
|
|
|
package contained in this set? |
|
look up a package by name
|
|
|
|
|
|
|
|
|
|
remove a package by name |
|
remove a package Note: it does not matter if pkg is actually the pointer stored. The item to be deleted is identified by name. |
|
The required, conflicted, provided and obsoleted methods return the reverse indices for packages relations. The returned value is a hash that can be indexed by a PkgName. For example, to learn the names of all packages that require foo: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|