Next: extern Configuration *_config
Up: PkgDebian
Previous: pkgCacheFile
Indice
pkgCache::PkgIterator
This is the class of the package entry identifier set in the
method. It is involved in the whole ``single package operation''
category. The
class belongs to a set of iterators
useful for navigation of the cache structure. They provide common
visit operations and an
function. The last one can
be used to check if the corresponding list has been fully traversed.
Unlike Standard Template Library iterators, they contain helper functions
to access data that is being iterated over. This is because the data
structures cannot be formed in a manner that is intuitive to use and
also memory mappable. For each variable in the target structure that
would need a translation to be accessed correctly, a translating function
of the same name is present in the iterator. If applicable this function
will return an iterator. We show here the interesting part of the
interface to all this type of iterators defined in
:
-
: it returns the package name;
-
: it returns the name of the
section the package belongs to;
-
: in this way we access
a
instance, that iterates over available versions
of a package. The methods of this new iterator, are used to retrieve
the corresponding version number (
), the priority
type (
), its dependencies (
),
or the list of provided packages (
).
They are all involved in the
method of the PkgDebian
class;
-
: the
iterator belongs to the same category of iterators. It can iterate
over two lists, a list of version depends (we have just seen the
method), or a list of package reverse depends.
The type is determined by the structure passed to the constructor,
which should be the structure that has the depends pointer as a member.
This method, for example, returns the reverse dependencies iterator.
Thus, in the PkgDebian implementation, the
is central in developing the functions
and
.
Next: extern Configuration *_config
Up: PkgDebian
Previous: pkgCacheFile
Indice
2004-11-19