apt: pkgCache< Str, Itr > Class Template Reference

apt 2.7.6 commandline package manager

Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
pkgCache< Str, Itr > Class Template Reference
Inheritance diagram for pkgCache< Str, Itr >:

## Classes
struct | Dep
struct | Dependency
struct | DependencyData
| information for a single dependency record More...
struct | DependencyProxy
struct | DescFile
| associates a description with a Translation file More...
struct | Description
| datamember of a linked list of available description for a version More...
struct | Flag
struct | Group
| groups architecture depending packages together More...
struct | Header
class | Iterator
class | Namespace
struct | Package
| contains information for a single unique package More...
struct | PackageFile
| stores information about the files used to generate the cache More...
struct | Provides
| handles virtual packages More...
struct | ReleaseFile
| stores information about the release files used to generate the cache More...
struct | State
struct | VerFile
| associates a version with a PackageFile More...
struct | Version
| information for a single version of a package More...

## Public Types
enum | OkState { NeedsNothing , NeedsUnpack , NeedsConfigure }
using | iterator_category = std::forward_iterator_tag
using | value_type = Str
using | difference_type = std::ptrdiff_t
using | pointer = Str *
using | reference = Str &

## Public Member Functions
bool | end () const
bool | operator== (const Itr &B) const
bool | operator!= (const Itr &B) const
Str * | operator-> ()
Str const * | operator-> () const
| operator Str * ()
| operator Str const * () const
Str & | operator* ()
Str const & | operator* () const
pkgCache * | Cache () const
bool | IsGood () const
unsigned long | Index () const
map_pointer< Str > | MapPointer () const
void | ReMap (void const *const oldMap, void *const newMap)
| Iterator ()
| Iterator (pkgCache &Owner, Str *T=0)
Group * | OwnerPointer () const
| GrpIterator (pkgCache &Owner)
GrpIterator & | operator++ ()
GrpIterator | operator++ (int)
const char * | Name () const
PkgIterator | PackageList () const
VerIterator | VersionsInSource () const
PkgIterator | FindPkg (APT::StringView Arch=APT::StringView("any", 3)) const
PkgIterator | FindPreferredPkg (bool const &PreferNonVirtual=true) const
| find the package with the "best" architecture
PkgIterator | NextPkg (PkgIterator const &Pkg) const
| GrpIterator (pkgCache &Owner, Group *Trg)
| GrpIterator ()
Package * | OwnerPointer () const
| PkgIterator (pkgCache &Owner)
PkgIterator & | operator++ ()
PkgIterator | operator++ (int)
const char * | Name () const
bool | Purge () const
const char * | Arch () const
APT_PURE GrpIterator | Group () const
VerIterator | VersionList () const APT_PURE
VerIterator | CurrentVer () const APT_PURE
DepIterator | RevDependsList () const APT_PURE
PrvIterator | ProvidesList () const APT_PURE
OkState | State () const APT_PURE
const char * | CurVersion () const APT_PURE
| PkgIterator (pkgCache &Owner, Package *Trg)
| PkgIterator ()
Version * | OwnerPointer () const
VerIterator & | operator++ ()
VerIterator | operator++ (int)
VerIterator | NextInSource ()
int | CompareVer (const VerIterator &B) const
bool | SimilarVer (const VerIterator &B) const
| compares two version and returns if they are similar
const char * | VerStr () const
const char * | Section () const
const char * | SourcePkgName () const
| source package name this version comes from Always contains the name, even if it is the same as the binary name
const char * | SourceVerStr () const
| source version this version comes from Always contains the version string, even if it is the same as the binary version
const char * | Arch () const
PkgIterator | ParentPkg () const
DescIterator | DescriptionList () const
DescIterator | TranslatedDescriptionForLanguage (APT::StringView lang) const
DescIterator | TranslatedDescription () const
DepIterator | DependsList () const
PrvIterator | ProvidesList () const
VerFileIterator | FileList () const
bool | Downloadable () const
const char * | PriorityType () const
const char * | MultiArchType () const APT_PURE
std::string | RelStr () const
bool | Automatic () const
VerFileIterator | NewestFile () const
| VerIterator (pkgCache &Owner, Version *Trg=0)
| VerIterator ()
Description * | OwnerPointer () const
DescIterator & | operator++ ()
DescIterator | operator++ (int)
int | CompareDesc (const DescIterator &B) const
const char * | LanguageCode () const
const char * | md5 () const
DescFileIterator | FileList () const
| DescIterator ()
| DescIterator (pkgCache &Owner, Description *Trg=0)
Dependency * | OwnerPointer () const
DepIterator & | operator++ ()
DepIterator | operator++ (int)
const char * | TargetVer () const
PkgIterator | TargetPkg () const
PkgIterator | SmartTargetPkg () const
VerIterator | ParentVer () const
PkgIterator | ParentPkg () const
bool | Reverse () const
bool | IsCritical () const APT_PURE
bool | IsNegative () const APT_PURE
bool | IsIgnorable (PrvIterator const &Prv) const APT_PURE
bool | IsIgnorable (PkgIterator const &Pkg) const APT_PURE
bool | IsMultiArchImplicit () const APT_PURE
bool | IsImplicit () const APT_PURE
bool | IsSatisfied (VerIterator const &Ver) const APT_PURE
bool | IsSatisfied (PrvIterator const &Prv) const APT_PURE
void | GlobOr (DepIterator &Start, DepIterator &End)
Version ** | AllTargets () const
bool | SmartTargetPkg (PkgIterator &Result) const
const char * | CompType () const
const char * | DepType () const
DependencyProxy | operator-> () const
DependencyProxy | operator-> ()
void | ReMap (void const *const oldMap, void *const newMap)
| DepIterator (pkgCache &Owner, Dependency *Trg, Package *)
| DepIterator ()
Provides * | OwnerPointer () const
PrvIterator & | operator++ ()
PrvIterator | operator++ (int)
const char * | Name () const
const char * | ProvideVersion () const
PkgIterator | ParentPkg () const
VerIterator | OwnerVer () const
PkgIterator | OwnerPkg () const
bool | IsMultiArchImplicit () const APT_PURE
| PrvIterator ()
| PrvIterator (pkgCache &Owner, Provides *Trg, Version *)
| PrvIterator (pkgCache &Owner, Provides *Trg, Package *)
ReleaseFile * | OwnerPointer () const
RlsFileIterator & | operator++ ()
RlsFileIterator | operator++ (int)
const char * | FileName () const
const char * | Archive () const
const char * | Version () const
const char * | Origin () const
const char * | Codename () const
const char * | Label () const
const char * | Site () const
bool | Flagged (pkgCache::Flag::ReleaseFileFlags const flag) const
std::string | RelStr ()
| RlsFileIterator ()
| RlsFileIterator (pkgCache &Owner)
| RlsFileIterator (pkgCache &Owner, ReleaseFile *Trg)
PackageFile * | OwnerPointer () const
PkgFileIterator & | operator++ ()
PkgFileIterator | operator++ (int)
const char * | FileName () const
pkgCache::RlsFileIterator | ReleaseFile () const
const char * | Archive () const
const char * | Version () const
const char * | Origin () const
const char * | Codename () const
const char * | Label () const
const char * | Site () const
bool | Flagged (pkgCache::Flag::ReleaseFileFlags const flag) const
bool | Flagged (pkgCache::Flag::PkgFFlags const flag) const
const char * | Component () const
const char * | Architecture () const
const char * | IndexType () const
std::string | RelStr ()
| PkgFileIterator ()
| PkgFileIterator (pkgCache &Owner)
| PkgFileIterator (pkgCache &Owner, PackageFile *Trg)
VerFile * | OwnerPointer () const
VerFileIterator & | operator++ ()
VerFileIterator | operator++ (int)
PkgFileIterator | File () const
| VerFileIterator ()
| VerFileIterator (pkgCache &Owner, VerFile *Trg)
DescFile * | OwnerPointer () const
DescFileIterator & | operator++ ()
DescFileIterator | operator++ (int)
PkgFileIterator | File () const
| DescFileIterator ()
| DescFileIterator (pkgCache &Owner, DescFile *Trg)
virtual bool | ReMap (bool const &Errorchecks=true)
bool | Sync ()
MMap & | GetMap ()
void * | DataEnd ()
map_id_t | Hash (APT::StringView S) const
APT_HIDDEN uint32_t | CacheHash ()
GrpIterator | FindGrp (APT::StringView Name)
PkgIterator | FindPkg (APT::StringView Name)
PkgIterator | FindPkg (APT::StringView Name, APT::StringView Arch)
APT::StringView | ViewString (map_stringitem_t idx) const
Header & | Head ()
GrpIterator | GrpBegin ()
GrpIterator | GrpEnd ()
PkgIterator | PkgBegin ()
PkgIterator | PkgEnd ()
PkgFileIterator | FileBegin ()
PkgFileIterator | FileEnd ()
RlsFileIterator | RlsFileBegin ()
RlsFileIterator | RlsFileEnd ()
bool | MultiArchCache () const
char const * | NativeArch ()
| pkgCache (MMap *Map, bool DoMap=true)

## Static Public Member Functions
static const char * | Priority (unsigned char Priority)
static const char * | CompTypeDeb (unsigned char Comp) APT_PURE
static const char * | CompType (unsigned char Comp) APT_PURE
static const char * | DepType (unsigned char Dep)

## Public Attributes
Header * | HeaderP
Group * | GrpP
Package * | PkgP
VerFile * | VerFileP
DescFile * | DescFileP
ReleaseFile * | RlsFileP
PackageFile * | PkgFileP
Version * | VerP
Description * | DescP
Provides * | ProvideP
Dependency * | DepP
DependencyData * | DepDataP
char * | StrP
void * | reserved [12]
pkgVersioningSystem * | VS

## Protected Member Functions
map_id_t | sHash (APT::StringView S) const APT_PURE

## Protected Attributes
Str * | S
pkgCache * | Owner
std::string | CacheFile
MMap & | Map

## Friends
APT_DEPRECATED_MSG("Use APT::PrettyPkg instead") friend std std::string | FullName (bool const &Pretty=false) const
APT_DEPRECATED_MSG("Use APT::PrettyDep instead") friend std | DepIterator (pkgCache &Owner, Dependency *Trg, Version *=0)

## Member Function Documentation

## ◆ FindPreferredPkg()

template<typename Str , typename Itr >

PkgIterator FindPreferredPkg | ( | bool const & | PreferNonVirtual = `true` | ) | const

find the package with the "best" architecture

The best architecture is either the "native" or the first in the list of Architectures which is not an end-Pointer

Parameters

  PreferNonVirtual | tries to respond with a non-virtual package and only if this fails returns the best virtual package

## ◆ SimilarVer()

template<typename Str , typename Itr >

bool SimilarVer | ( | const VerIterator & | B | ) | const
| inline

compares two version and returns if they are similar

This method should be used to identify if two pseudo versions are referring to the same "real" version

The documentation for this class was generated from the following files:

- apt-pkg/cacheiterators.h
- apt-pkg/pkgcache.h
- apt-pkg/pkgcache.cc