summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheiterators.h
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-06-29 18:00:54 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-06-29 18:00:54 +0200
commitaf29ffb44d95dfb0f7b0c1835e2e501313f74723 (patch)
treedd1c5f45e2cb5a681558408598ca4fe44ee4961b /apt-pkg/cacheiterators.h
parent55a5a46c235a30bf024fb2301066553953701cc5 (diff)
* add depth information to the debug output and show what depends
type triggers a autoinst (closes: #458389) * add debug::pkgDepCache::Marker with more detailed debug output (closes: #87520)
Diffstat (limited to 'apt-pkg/cacheiterators.h')
-rw-r--r--apt-pkg/cacheiterators.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index 63f9de8fc..cf79b3a6b 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -80,7 +80,13 @@ class pkgCache::PkgIterator
inline PrvIterator ProvidesList() const;
inline unsigned long Index() const {return Pkg - Owner->PkgP;};
OkState State() const;
-
+
+ //Nice printable representation
+ friend std::ostream& operator<<(std::ostream& out, pkgCache::PkgIterator Pkg);
+
+ const char *CandVersion() const;
+ const char *CurVersion() const;
+
// Constructors
inline PkgIterator(pkgCache &Owner,Package *Trg) : Pkg(Trg), Owner(&Owner),
HashIndex(0)
@@ -111,7 +117,10 @@ class pkgCache::VerIterator
inline bool operator ==(const VerIterator &B) const {return Ver == B.Ver;};
inline bool operator !=(const VerIterator &B) const {return Ver != B.Ver;};
int CompareVer(const VerIterator &B) const;
-
+
+ // Testing
+ inline bool IsGood() const { return Ver && Owner && ! end();};
+
// Accessors
inline Version *operator ->() {return Ver;};
inline Version const *operator ->() const {return Ver;};