Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

librpmDb::db_const_iterator Class Reference

Subclass to retrieve database content. More...

#include <librpmDb.h>

List of all members.

Public Member Functions

 db_const_iterator (constlibrpmDbPtr dbptr_r=0)
 ~db_const_iterator ()
PMError dbError () const
void operator++ ()
unsigned dbHdrNum () const
const constRpmHeaderPtr & operator * () const
const constRpmHeaderPtr & operator-> () const
bool findAll ()
bool findByFile (const std::string &file_r)
bool findByProvides (const std::string &tag_r)
bool findByRequiredBy (const std::string &tag_r)
bool findByConflicts (const std::string &tag_r)
bool findByName (const PkgName &name_r)
bool findPackage (const PkgName &name_r)
bool findPackage (const PkgName &name_r, const PkgEdition &ed_r)
bool findPackage (const PkgNameEd &which_r)
bool findPackage (const constPMPackagePtr &which_r)

Private Member Functions

db_const_iteratoroperator= (const db_const_iterator &)
 db_const_iterator (const db_const_iterator &)

Private Attributes

D_d

Friends

std::ostream & operator<< (std::ostream &str, const db_const_iterator &obj)


Detailed Description

Subclass to retrieve database content.


Constructor & Destructor Documentation

librpmDb::db_const_iterator::db_const_iterator const db_const_iterator  )  [private]
 

librpmDb::db_const_iterator::db_const_iterator constlibrpmDbPtr  dbptr_r = 0  ) 
 

Constructor. Iterator is initialized to findAll. The default form accesses librpmDb's default database. Explicitly providing a database handle should not be neccesary, except for testing.

librpmDb::db_const_iterator::~db_const_iterator  ) 
 

Destructor.


Member Function Documentation

PMError librpmDb::db_const_iterator::dbError  )  const
 

Return any database error.

NOTE: If the database gets blocked (see dbRelease) dbError will immediately report this, but an already running iteration will proceed to its end. Then the database is dropped.

unsigned librpmDb::db_const_iterator::dbHdrNum  )  const
 

Returns the current headers index in database, 0 if no header.

bool librpmDb::db_const_iterator::findAll  ) 
 

Reset to iterate all packages. Returns true if iterator contains at least one entry.

NOTE: No entry (false) migt be returned due to a meanwhile blocked database (see dbRelease). Use dbError to check this.

bool librpmDb::db_const_iterator::findByConflicts const std::string &  tag_r  ) 
 

Reset to iterate all packages that conflict with a certain tag.

bool librpmDb::db_const_iterator::findByFile const std::string &  file_r  ) 
 

Reset to iterate all packages that own a certain file.

bool librpmDb::db_const_iterator::findByName const PkgName name_r  ) 
 

Reset to iterate all packages with a certain name.

NOTE: Multiple entries for one package installed in different versions are possible but not desired. Usually you'll want to use findPackage instead.

findByName is needed to retrieve pseudo packages like 'gpg-pubkey', which in fact exist in multiple instances.

bool librpmDb::db_const_iterator::findByProvides const std::string &  tag_r  ) 
 

Reset to iterate all packages that provide a certain tag.

bool librpmDb::db_const_iterator::findByRequiredBy const std::string &  tag_r  ) 
 

Reset to iterate all packages that require a certain tag.

bool librpmDb::db_const_iterator::findPackage const constPMPackagePtr &  which_r  ) 
 

Abbr. for findPackage( which_r->name(), which_r->edition() );

bool librpmDb::db_const_iterator::findPackage const PkgNameEd which_r  )  [inline]
 

Abbr. for findPackage( which_r.name, which_r.edition );

bool librpmDb::db_const_iterator::findPackage const PkgName name_r,
const PkgEdition ed_r
 

Find package by name and edition. Commonly used by PMRpmPackageDataProvider.

bool librpmDb::db_const_iterator::findPackage const PkgName name_r  ) 
 

Find package by name.

Multiple entries for one package installed in different versions are possible but not desired. If so, the last package installed is returned.

const constRpmHeaderPtr & librpmDb::db_const_iterator::operator *  )  const
 

Returns the current constRpmHeaderPtr or NULL, if no more entries available.

void librpmDb::db_const_iterator::operator++  ) 
 

Advance to next constRpmHeaderPtr.

const constRpmHeaderPtr& librpmDb::db_const_iterator::operator->  )  const [inline]
 

Forwards to the current constRpmHeaderPtr.

db_const_iterator& librpmDb::db_const_iterator::operator= const db_const_iterator  )  [private]
 


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  str,
const db_const_iterator obj
[friend]
 


Member Data Documentation

D& librpmDb::db_const_iterator::_d [private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 9 14:30:32 2007 for yast2-packagemanager by doxygen 1.3.6