inline Str const *operator ->() const {return S;};
inline operator Str *() {return S == OwnerPointer() ? 0 : S;};
inline operator Str const *() const {return S == OwnerPointer() ? 0 : S;};
+ inline Str &operator *() {return *S;};
inline Str const &operator *() const {return *S;};
inline pkgCache *Cache() {return Owner;};
//Nice printable representation
friend std::ostream& operator <<(std::ostream& out, PkgIterator i);
+ std::string FullName(bool const &Pretty = false) const;
// Constructors
inline PkgIterator(pkgCache &Owner,Package *Trg) : Iterator<Package, PkgIterator>(Owner, Trg), HashIndex(0) {
// Accessors
inline const char *VerStr() const {return S->VerStr == 0?0:Owner->StrP + S->VerStr;};
inline const char *Section() const {return S->Section == 0?0:Owner->StrP + S->Section;};
- inline const char *Arch() const {return S->Arch == 0?0:Owner->StrP + S->Arch;};
+ inline const char *Arch() const {
+ if(S->MultiArch == pkgCache::Version::All)
+ return "all";
+ return S->ParentPkg == 0?0:Owner->StrP + ParentPkg()->Arch;
+ };
+ inline const char *Arch(bool const pseudo) const {
+ if(pseudo == false)
+ return Arch();
+ return S->ParentPkg == 0?0:Owner->StrP + ParentPkg()->Arch;
+ };
inline PkgIterator ParentPkg() const {return PkgIterator(*Owner,Owner->PkgP + S->ParentPkg);};
inline DescIterator DescriptionList() const;
string RelStr();
bool Automatic() const;
+ bool Pseudo() const;
VerFileIterator NewestFile() const;
inline VerIterator(pkgCache &Owner,Version *Trg = 0) : Iterator<Version, VerIterator>(Owner, Trg) {
// Constructors
inline PkgFileIterator() : Iterator<PackageFile, PkgFileIterator>() {};
- inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg = 0) : Iterator<PackageFile, PkgFileIterator>(Owner, Trg) {};
+ inline PkgFileIterator(pkgCache &Owner) : Iterator<PackageFile, PkgFileIterator>(Owner, Owner.PkgFileP) {};
+ inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg) : Iterator<PackageFile, PkgFileIterator>(Owner, Trg) {};
};
/*}}}*/
// Version File /*{{{*/