Deepsolver
Public Types | Public Member Functions
Deepsolver::AbstractInstalledPkgIterator Class Reference

The abstract interface for iterator over a set of installed packages. More...

Inheritance diagram for Deepsolver::AbstractInstalledPkgIterator:
Deepsolver::RpmInstalledPkgIterator

List of all members.

Public Types

typedef std::shared_ptr
< AbstractInstalledPkgIterator
Ptr

Public Member Functions

 AbstractInstalledPkgIterator ()
 The default constructor.
virtual bool moveNext (Pkg &pkg)=0
 Goes to next installed package and fills data associated with it.
virtual ~AbstractInstalledPkgIterator ()
 The destructor.

Detailed Description

This class isolates any engine of particular package library, which can be used to read database with installed packages data. Its instance should be obtained through the methods of AbstractPackageBackEnd class.

See also:
AbstractPackageBackEnd RpmBackEnd RpmInstalledPackagesIterator

Member Function Documentation

virtual bool Deepsolver::AbstractInstalledPkgIterator::moveNext ( Pkg pkg) [pure virtual]

After creation the iterator is pointed before the first element. Each invocation of this method changes position to next package if there is any and fills necessary data. If there is no next package (including the case there are no packages at all) this method returns zero.

Parameters:
[out]pkgThe Pkg class instance to received data
Returns:
Non-zero if there is the next package or zero otherwise (including the case there are no packages at all)

Implemented in Deepsolver::RpmInstalledPkgIterator.