summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheiterators.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-04-28 09:22:55 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-31 13:49:37 +0200
commit90daf43aeb6a911f6511faf5064f5811fd27acb5 (patch)
tree0cba503cc9005ae417c5d932e1632fdca9732e1b /apt-pkg/cacheiterators.h
parent18048c51c1d8cff71f134dd405421baba292944b (diff)
factor out Pkg/DepIterator prettyprinters into own header
The old prettyprinters have only access to the struct they pretty print, which isn't enough usually as we want to know for a package also a bit of state information like which version is the candidate. We therefore need to pull the DepCache into context and hence use a temporary struct which is printed instead of the iterator itself. (cherry picked from commit 84573326f41dd09b914b8374548e7ee7c93d0439)
Diffstat (limited to 'apt-pkg/cacheiterators.h')
-rw-r--r--apt-pkg/cacheiterators.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index 75a31a4b3..6acea3ba0 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -179,7 +179,7 @@ class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> {
const char *CurVersion() const APT_PURE;
//Nice printable representation
- friend std::ostream& operator <<(std::ostream& out, PkgIterator i);
+ APT_DEPRECATED_MSG("Use APT::PrettyPkg instead") friend std::ostream& operator <<(std::ostream& out, PkgIterator i);
std::string FullName(bool const &Pretty = false) const;
// Constructors
@@ -343,7 +343,7 @@ class pkgCache::DepIterator : public Iterator<Dependency, DepIterator> {
}
//Nice printable representation
- friend std::ostream& operator <<(std::ostream& out, DepIterator D);
+ APT_DEPRECATED_MSG("Use APT::PrettyDep instead") friend std::ostream& operator <<(std::ostream& out, DepIterator D);
inline DepIterator(pkgCache &Owner, Dependency *Trg, Version* = 0) :
Iterator<Dependency, DepIterator>(Owner, Trg), Type(DepVer), S2(Trg == 0 ? Owner.DepDataP : (Owner.DepDataP + Trg->DependencyData)) {