#include <package_database.hh>
Iterate over our repositories | |
typedef WrappedForwardIterator < RepositoryConstIteratorTag, const std::tr1::shared_ptr < Repository > > | RepositoryConstIterator |
RepositoryConstIterator | begin_repositories () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
RepositoryConstIterator | end_repositories () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
Basic operations | |
PackageDatabase (const Environment *const) | |
~PackageDatabase () | |
Public Member Functions | |
void | add_repository (int importance, const std::tr1::shared_ptr< Repository >) |
std::tr1::shared_ptr< const Repository > | fetch_repository (const RepositoryName &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
std::tr1::shared_ptr< Repository > | fetch_repository (const RepositoryName &) PALUDIS_ATTRIBUTE((warn_unused_result)) |
bool | has_repository_named (const RepositoryName &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
RepositoryName | favourite_repository () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
QualifiedPackageName | fetch_unique_qualified_package_name (const PackageNamePart &, const Filter &=all_filter()) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
bool | more_important_than (const RepositoryName &, const RepositoryName &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
void paludis::PackageDatabase::add_repository | ( | int | importance, | |
const std::tr1::shared_ptr< Repository > | ||||
) |
Add a repository.
DuplicateRepositoryError | if a Repository with the same name as the new Repository already exists in our collection. |
std::tr1::shared_ptr<const Repository> paludis::PackageDatabase::fetch_repository | ( | const RepositoryName & | ) | const |
Fetch a named repository.
std::tr1::shared_ptr<Repository> paludis::PackageDatabase::fetch_repository | ( | const RepositoryName & | ) |
Fetch a named repository.
bool paludis::PackageDatabase::has_repository_named | ( | const RepositoryName & | ) | const |
Do we have a named repository?
RepositoryName paludis::PackageDatabase::favourite_repository | ( | ) | const |
Fetch the name of our 'favourite' repository (if a repository's name matches this when doing a graphical display, the repository name part may be omitted).
Note that this is the repository with the lowest importance that is not a virtuals or installed_virtuals repository.
QualifiedPackageName paludis::PackageDatabase::fetch_unique_qualified_package_name | ( | const PackageNamePart & | , | |
const Filter & | = all_filter() | |||
) | const |
Disambiguate a package name. If a filter is specified, limit the potential results to packages that match.
AmbiguousPackageNameError | if there is no unambiguous disambiguation. |
bool paludis::PackageDatabase::more_important_than | ( | const RepositoryName & | , | |
const RepositoryName & | ||||
) | const |
Return true if the first repository is more important than the second.