paludis::PackageDatabase Class Reference
[Package Database]

#include <package_database.hh>

Inheritance diagram for paludis::PackageDatabase:

paludis::PrivateImplementationPattern< C_ >

List of all members.

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< Repositoryfetch_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))


Detailed Description

A PackageDatabase, which is owned by an Environment, contains a number of Repository instances and supports various querying methods.

Member Function Documentation

void paludis::PackageDatabase::add_repository ( int  importance,
const std::tr1::shared_ptr< Repository  
)

Add a repository.

Exceptions:
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.

Exceptions:
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.


The documentation for this class was generated from the following file:
Generated on Mon Sep 21 10:36:11 2009 for paludis by  doxygen 1.5.4