apt  2.2.4
About: Apt (Advanced Package Tool) is a management system for software packages (Debian/Ubuntu). Release series 2.2.
  Fossies Dox: apt-2.2.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

pkgCacheGenerator Class Reference

#include <pkgcachegen.h>

Collaboration diagram for pkgCacheGenerator:
[legend]

Classes

class  Dynamic
 

Public Types

enum  StringType { MIXED , VERSIONNUMBER , SECTION }
 

Public Member Functions

map_stringitem_t StoreString (StringType const type, const char *S, unsigned int const Size)
 
map_stringitem_t StoreString (enum StringType const type, APT::StringView S)
 
void DropProgress ()
 
bool SelectFile (const std::string &File, pkgIndexFile const &Index, std::string const &Architecture, std::string const &Component, unsigned long Flags=0)
 
bool SelectReleaseFile (const std::string &File, const std::string &Site, unsigned long Flags=0)
 
bool MergeList (ListParser &List, pkgCache::VerIterator *Ver=0)
 
pkgCacheGetCache ()
 
pkgCache::PkgFileIterator GetCurFile ()
 
pkgCache::RlsFileIterator GetCurRlsFile ()
 
void ReMap (void const *const oldMap, void *const newMap, size_t oldSize)
 
bool Start ()
 
 pkgCacheGenerator (DynamicMMap *Map, OpProgress *Progress)
 
virtual ~pkgCacheGenerator ()
 

Static Public Member Functions

static APT_PUBLIC bool MakeStatusCache (pkgSourceList &List, OpProgress *Progress, MMap **OutMap=0, bool AllowMem=false)
 
static APT_HIDDEN bool MakeStatusCache (pkgSourceList &List, OpProgress *Progress, MMap **OutMap, pkgCache **OutCache, bool AllowMem=false)
 
static APT_PUBLIC bool MakeOnlyStatusCache (OpProgress *Progress, DynamicMMap **OutMap)
 

Protected Member Functions

bool NewGroup (pkgCache::GrpIterator &Grp, APT::StringView Name)
 
bool NewPackage (pkgCache::PkgIterator &Pkg, APT::StringView Name, APT::StringView Arch)
 
map_pointer< pkgCache::VersionNewVersion (pkgCache::VerIterator &Ver, APT::StringView const &VerStr, map_pointer< pkgCache::Package > const ParentPkg, uint32_t Hash, map_pointer< pkgCache::Version > const Next)
 
map_pointer< pkgCache::DescriptionNewDescription (pkgCache::DescIterator &Desc, const std::string &Lang, APT::StringView md5sum, map_stringitem_t const idxmd5str)
 
bool NewFileVer (pkgCache::VerIterator &Ver, ListParser &List)
 
bool NewFileDesc (pkgCache::DescIterator &Desc, ListParser &List)
 
bool NewDepends (pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver, map_stringitem_t const Version, uint8_t const Op, uint8_t const Type, map_pointer< pkgCache::Dependency > *&OldDepLast)
 
bool NewProvides (pkgCache::VerIterator &Ver, pkgCache::PkgIterator &Pkg, map_stringitem_t const ProvidesVersion, uint8_t const Flags)
 

Protected Attributes

DynamicMMapMap
 
pkgCache Cache
 
OpProgressProgress
 
std::string RlsFileName
 
pkgCache::ReleaseFileCurrentRlsFile
 
std::string PkgFileName
 
pkgCache::PackageFileCurrentFile
 

Private Types

typedef pkgCacheListParser ListParser
 

Private Member Functions

APT_HIDDEN map_stringitem_t WriteStringInMap (APT::StringView String)
 
APT_HIDDEN map_stringitem_t WriteStringInMap (const char *String)
 
APT_HIDDEN map_stringitem_t WriteStringInMap (const char *String, const unsigned long &Len)
 
APT_HIDDEN uint32_t AllocateInMap (const unsigned long &size)
 
template<typename T >
map_pointer< T > AllocateInMap ()
 
APT_HIDDEN bool MergeListGroup (ListParser &List, std::string const &GrpName)
 
APT_HIDDEN bool MergeListPackage (ListParser &List, pkgCache::PkgIterator &Pkg)
 
APT_HIDDEN bool MergeListVersion (ListParser &List, pkgCache::PkgIterator &Pkg, APT::StringView const &Version, pkgCache::VerIterator *&OutVer)
 
APT_HIDDEN bool AddImplicitDepends (pkgCache::GrpIterator &G, pkgCache::PkgIterator &P, pkgCache::VerIterator &V)
 
APT_HIDDEN bool AddImplicitDepends (pkgCache::VerIterator &V, pkgCache::PkgIterator &D)
 
APT_HIDDEN bool AddNewDescription (ListParser &List, pkgCache::VerIterator &Ver, std::string const &lang, APT::StringView CurMd5, map_stringitem_t &md5idx)
 

Private Attributes

void *const d
 

Friends

class pkgCacheListParser
 

Detailed Description

Definition at line 42 of file pkgcachegen.h.

Member Typedef Documentation

◆ ListParser

typedef pkgCacheListParser ListParser
private

Definition at line 80 of file pkgcachegen.h.

Member Enumeration Documentation

◆ StringType

enum StringType
Enumerator
MIXED 
VERSIONNUMBER 
SECTION 

Definition at line 128 of file pkgcachegen.h.

Constructor & Destructor Documentation

◆ pkgCacheGenerator()

pkgCacheGenerator ( DynamicMMap Map,
OpProgress Progress 
)

Definition at line 68 of file pkgcachegen.cc.

Referenced by MakeStatusCache().

◆ ~pkgCacheGenerator()

Member Function Documentation

◆ AddImplicitDepends() [1/2]

◆ AddImplicitDepends() [2/2]

◆ AddNewDescription()

bool AddNewDescription ( ListParser List,
pkgCache::VerIterator Ver,
std::string const &  lang,
APT::StringView  CurMd5,
map_stringitem_t md5idx 
)
private

◆ AllocateInMap() [1/2]

map_pointer<T> AllocateInMap ( )
inlineprivate

Definition at line 48 of file pkgcachegen.h.

◆ AllocateInMap() [2/2]

uint32_t AllocateInMap ( const unsigned long &  size)
private

Definition at line 226 of file pkgcachegen.cc.

References DynamicMMap::Allocate(), MMap::Data(), Map, ReMap(), and MMap::Size().

◆ DropProgress()

void DropProgress ( )
inline

Definition at line 133 of file pkgcachegen.h.

◆ GetCache()

pkgCache& GetCache ( )
inline

Definition at line 137 of file pkgcachegen.h.

Referenced by BuildCache(), and writeBackMMapToFile().

◆ GetCurFile()

pkgCache::PkgFileIterator GetCurFile ( )
inline

Definition at line 138 of file pkgcachegen.h.

References pkgCache< Str, Itr >::PkgFileIterator().

Referenced by pkgDebianIndexFile::Merge().

◆ GetCurRlsFile()

pkgCache::RlsFileIterator GetCurRlsFile ( )
inline

Definition at line 140 of file pkgcachegen.h.

References pkgCache< Str, Itr >::RlsFileIterator().

◆ MakeOnlyStatusCache()

bool MakeOnlyStatusCache ( OpProgress Progress,
DynamicMMap **  OutMap 
)
static

◆ MakeStatusCache() [1/2]

◆ MakeStatusCache() [2/2]

bool MakeStatusCache ( pkgSourceList List,
OpProgress Progress,
MMap **  OutMap = 0,
bool  AllowMem = false 
)
static

Definition at line 1655 of file pkgcachegen.cc.

References Progress.

Referenced by pkgCacheFile::BuildCaches(), and Go().

◆ MergeList()

◆ MergeListGroup()

bool MergeListGroup ( ListParser List,
std::string const &  GrpName 
)
private

◆ MergeListPackage()

◆ MergeListVersion()

◆ NewDepends()

◆ NewDescription()

◆ NewFileDesc()

◆ NewFileVer()

◆ NewGroup()

◆ NewPackage()

◆ NewProvides()

◆ NewVersion()

◆ ReMap()

◆ SelectFile()

◆ SelectReleaseFile()

◆ Start()

◆ StoreString() [1/2]

map_stringitem_t StoreString ( enum StringType const  type,
APT::StringView  S 
)
inline

Definition at line 131 of file pkgcachegen.h.

References StringView::data(), StringView::length(), and StoreString().

Referenced by StoreString().

◆ StoreString() [2/2]

map_stringitem_t StoreString ( StringType const  type,
const char *  S,
unsigned int const  Size 
)

◆ WriteStringInMap() [1/3]

◆ WriteStringInMap() [2/3]

map_stringitem_t WriteStringInMap ( const char *  String)
private

◆ WriteStringInMap() [3/3]

map_stringitem_t WriteStringInMap ( const char *  String,
const unsigned long &  Len 
)
private

Friends And Related Function Documentation

◆ pkgCacheListParser

friend class pkgCacheListParser
friend

Definition at line 79 of file pkgcachegen.h.

Member Data Documentation

◆ Cache

◆ CurrentFile

pkgCache::PackageFile* CurrentFile
protected

Definition at line 110 of file pkgcachegen.h.

Referenced by MergeListVersion(), NewFileDesc(), NewFileVer(), ReMap(), and SelectFile().

◆ CurrentRlsFile

pkgCache::ReleaseFile* CurrentRlsFile
protected

Definition at line 108 of file pkgcachegen.h.

Referenced by ReMap(), SelectFile(), and SelectReleaseFile().

◆ d

void* const d
private

Definition at line 156 of file pkgcachegen.h.

Referenced by NewVersion().

◆ Map

◆ PkgFileName

std::string PkgFileName
protected

Definition at line 109 of file pkgcachegen.h.

Referenced by SelectFile().

◆ Progress

OpProgress* Progress
protected

Definition at line 105 of file pkgcachegen.h.

Referenced by MakeOnlyStatusCache(), MakeStatusCache(), MergeList(), and SelectFile().

◆ RlsFileName

std::string RlsFileName
protected

Definition at line 107 of file pkgcachegen.h.

Referenced by SelectReleaseFile().


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