apt 3.0.3
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 >:
[legend]
Collaboration diagram for pkgCache< Str, Itr >:
[legend]

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  SourceVersion
 information for a single version of a source package 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
 
pkgCacheCache () 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)
 
GroupOwnerPointer () const
 
 GrpIterator (pkgCache &Owner)
 
GrpIterator & operator++ ()
 
GrpIterator operator++ (int)
 
const char * Name () const
 
PkgIterator PackageList () const
 
VerIterator VersionsInSource () const
 
PkgIterator FindPkg (std::string_view Arch={"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 ()
 
PackageOwnerPointer () 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
 
std::string FullName (bool const &Pretty=false) const
 
 PkgIterator (pkgCache &Owner, Package *Trg)
 
 PkgIterator ()
 
SourceVersionOwnerPointer () const
 
APT_PURE GrpIterator Group () const
 
const char * VerStr () const
 
 SrcVerIterator (pkgCache &Owner, SourceVersion *Trg=0)
 
 SrcVerIterator ()
 
VersionOwnerPointer () 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
 
SrcVerIterator SourceVersion () const
 source version this version comes from Always contains the version string, even if it is the same as the binary version
 
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 (std::string_view 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
 
bool IsSecurityUpdate () const
 
 VerIterator (pkgCache &Owner, Version *Trg=0)
 
 VerIterator ()
 
DescriptionOwnerPointer () 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)
 
DependencyOwnerPointer () 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 (PkgIterator const &Pkg) 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, Version *=0)
 
 DepIterator (pkgCache &Owner, Dependency *Trg, Package *)
 
 DepIterator ()
 
ProvidesOwnerPointer () 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 *)
 
ReleaseFileOwnerPointer () 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)
 
PackageFileOwnerPointer () 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)
 
VerFileOwnerPointer () const
 
VerFileIterator & operator++ ()
 
VerFileIterator operator++ (int)
 
PkgFileIterator File () const
 
 VerFileIterator ()
 
 VerFileIterator (pkgCache &Owner, VerFile *Trg)
 
DescFileOwnerPointer () const
 
DescFileIterator & operator++ ()
 
DescFileIterator operator++ (int)
 
PkgFileIterator File () const
 
 DescFileIterator ()
 
 DescFileIterator (pkgCache &Owner, DescFile *Trg)
 
virtual bool ReMap (bool const &Errorchecks=true)
 
bool Sync ()
 
MMapGetMap ()
 
void * DataEnd ()
 
map_id_t Hash (std::string_view S) const
 
APT_HIDDEN uint32_t CacheHash ()
 
GrpIterator FindGrp (std::string_view Name)
 
PkgIterator FindPkg (std::string_view Name)
 
PkgIterator FindPkg (std::string_view Name, std::string_view Arch)
 
std::string_view ViewString (map_stringitem_t idx) const
 
HeaderHead ()
 
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 std::string_view Priority_NoL10n (unsigned char Prio)
 
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)
 
static std::string_view DepType_NoL10n (unsigned char Dep)
 

Public Attributes

HeaderHeaderP
 
GroupGrpP
 
PackagePkgP
 
VerFileVerFileP
 
DescFileDescFileP
 
ReleaseFileRlsFileP
 
PackageFilePkgFileP
 
SourceVersionSrcVerP
 
VersionVerP
 
DescriptionDescP
 
ProvidesProvideP
 
DependencyDepP
 
DependencyDataDepDataP
 
char * StrP
 
void * reserved [13]
 
pkgVersioningSystemVS
 

Protected Member Functions

map_id_t sHash (std::string_view S) const APT_PURE
 

Protected Attributes

Str * S
 
pkgCacheOwner
 
std::string CacheFile
 
MMapMap
 

Friends

std::ostream & operator<< (std::ostream &out, PkgIterator i)
 
std::ostream & operator<< (std::ostream &out, DepIterator D)
 

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
PreferNonVirtualtries 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: