next up previous contents
Next: extern Configuration *_config Up: PkgDebian Previous: pkgCacheFile   Indice


pkgCache::PkgIterator

This is the class of the package entry identifier set in the $ \texttt{findPkg()}$ method. It is involved in the whole ``single package operation'' category. The
$ \texttt{PkgIterator}$ class belongs to a set of iterators useful for navigation of the cache structure. They provide common visit operations and an $ \texttt{end()}$ 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 $ \texttt{<apt-pkg/cacheiterators.h>}$:


next up previous contents
Next: extern Configuration *_config Up: PkgDebian Previous: pkgCacheFile   Indice
2004-11-19