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)  

debListParser Class Reference

#include <deblistparser.h>

Inheritance diagram for debListParser:
[legend]
Collaboration diagram for debListParser:
[legend]

Classes

struct  WordList
 

Public Member Functions

virtual std::string Package () APT_OVERRIDE
 
virtual bool ArchitectureAll () APT_OVERRIDE
 
virtual APT::StringView Architecture () APT_OVERRIDE
 
virtual APT::StringView Version () APT_OVERRIDE
 
virtual bool NewVersion (pkgCache::VerIterator &Ver) APT_OVERRIDE
 
virtual std::vector< std::string > AvailableDescriptionLanguages () APT_OVERRIDE
 
virtual APT::StringView Description_md5 () APT_OVERRIDE
 
virtual uint32_t VersionHash () APT_OVERRIDE
 
virtual bool SameVersion (uint32_t Hash, pkgCache::VerIterator const &Ver) APT_OVERRIDE
 
virtual bool UsePackage (pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver) APT_OVERRIDE
 
virtual map_filesize_t Offset () APT_OVERRIDE
 
virtual map_filesize_t Size () APT_OVERRIDE
 
virtual bool Step () APT_OVERRIDE
 
 debListParser (FileFd *File)
 
virtual ~debListParser ()
 
- Public Member Functions inherited from pkgCacheListParser
virtual bool CollectFileProvides (pkgCache &, pkgCache::VerIterator &)
 
 pkgCacheListParser ()
 
virtual ~pkgCacheListParser ()
 

Static Public Member Functions

static APT_PUBLIC unsigned char GetPrio (std::string Str)
 
static APT_PUBLIC const char * ParseDepends (const char *Start, const char *Stop, std::string &Package, std::string &Ver, unsigned int &Op, bool const &ParseArchFlags=false, bool const &StripMultiArch=true, bool const &ParseRestrictionsList=false, std::string const &Arch="")
 
static APT_PUBLIC const char * ParseDepends (const char *Start, const char *Stop, APT::StringView &Package, APT::StringView &Ver, unsigned int &Op, bool const ParseArchFlags=false, bool StripMultiArch=true, bool const ParseRestrictionsList=false, std::string Arch="")
 
static APT_PUBLIC const char * ConvertRelation (const char *I, unsigned int &Op)
 

Protected Member Functions

virtual bool ParseStatus (pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver)
 
bool ParseDepends (pkgCache::VerIterator &Ver, pkgTagSection::Key Key, unsigned int Type)
 
bool ParseProvides (pkgCache::VerIterator &Ver)
 
APT_HIDDEN unsigned char ParseMultiArch (bool const showErrors)
 
- Protected Member Functions inherited from pkgCacheListParser
bool NewGroup (pkgCache::GrpIterator &Grp, APT::StringView Name)
 
map_stringitem_t StoreString (pkgCacheGenerator::StringType const type, const char *S, unsigned int Size)
 
map_stringitem_t StoreString (pkgCacheGenerator::StringType const type, APT::StringView S)
 
map_stringitem_t WriteString (APT::StringView S)
 
map_stringitem_t WriteString (const char *S, unsigned int Size)
 
bool NewDepends (pkgCache::VerIterator &Ver, APT::StringView Package, APT::StringView Arch, APT::StringView Version, uint8_t const Op, uint8_t const Type)
 
bool NewProvides (pkgCache::VerIterator &Ver, APT::StringView PkgName, APT::StringView PkgArch, APT::StringView Version, uint8_t const Flags)
 
bool NewProvidesAllArch (pkgCache::VerIterator &Ver, APT::StringView Package, APT::StringView Version, uint8_t const Flags)
 

Static Protected Member Functions

static APT_HIDDEN bool GrabWord (APT::StringView Word, const WordList *List, unsigned char &Out)
 

Protected Attributes

pkgTagFile Tags
 
pkgTagSection Section
 
map_filesize_t iOffset
 

Private Attributes

std::vector< std::string > forceEssential
 
std::vector< std::string > forceImportant
 
std::string MD5Buffer
 
std::string myArch
 

Detailed Description

Definition at line 25 of file deblistparser.h.

Constructor & Destructor Documentation

◆ debListParser()

◆ ~debListParser()

~debListParser ( )
virtual

Definition at line 1043 of file deblistparser.cc.

Member Function Documentation

◆ Architecture()

APT::StringView Architecture ( )
virtual

Implements pkgCacheListParser.

Reimplemented in debTranslationsParser.

Definition at line 96 of file deblistparser.cc.

References pkgTagSection::Find(), and Section.

◆ ArchitectureAll()

bool ArchitectureAll ( )
virtual

Implements pkgCacheListParser.

Definition at line 104 of file deblistparser.cc.

References pkgTagSection::Find(), and Section.

Referenced by ParseMultiArch().

◆ AvailableDescriptionLanguages()

std::vector< std::string > AvailableDescriptionLanguages ( )
virtual

Implements pkgCacheListParser.

Reimplemented in edspLikeListParser.

Definition at line 260 of file deblistparser.cc.

References pkgTagSection::Exists(), APT::Configuration::getLanguages(), and Section.

◆ ConvertRelation()

const char * ConvertRelation ( const char *  I,
unsigned int &  Op 
)
static

◆ Description_md5()

◆ GetPrio()

unsigned char GetPrio ( std::string  Str)
static

Definition at line 999 of file deblistparser.cc.

References pkgCache< Str, Itr >::State::Extra, GrabWord(), and PrioList.

Referenced by SourcesWriter::DoPackage().

◆ GrabWord()

bool GrabWord ( APT::StringView  Word,
const WordList List,
unsigned char &  Out 
)
staticprotected

◆ NewVersion()

◆ Offset()

virtual map_filesize_t Offset ( )
inlinevirtual

Implements pkgCacheListParser.

Definition at line 71 of file deblistparser.h.

◆ Package()

string Package ( )
virtual

Implements pkgCacheListParser.

Definition at line 70 of file deblistparser.cc.

References pkgTagSection::Find(), Section, and tolower_ascii_inline().

Referenced by ParseDepends(), and ParseProvides().

◆ ParseDepends() [1/3]

const char * ParseDepends ( const char *  Start,
const char *  Stop,
APT::StringView Package,
APT::StringView Ver,
unsigned int &  Op,
bool const  ParseArchFlags = false,
bool  StripMultiArch = true,
bool const  ParseRestrictionsList = false,
std::string  Arch = "" 
)
static

◆ ParseDepends() [2/3]

const char * ParseDepends ( const char *  Start,
const char *  Stop,
std::string &  Package,
std::string &  Ver,
unsigned int &  Op,
bool const &  ParseArchFlags = false,
bool const &  StripMultiArch = true,
bool const &  ParseRestrictionsList = false,
std::string const &  Arch = "" 
)
static

Definition at line 555 of file deblistparser.cc.

References Package(), ParseDepends(), and StringView::to_string().

◆ ParseDepends() [3/3]

bool ParseDepends ( pkgCache::VerIterator Ver,
pkgTagSection::Key  Key,
unsigned int  Type 
)
protected

◆ ParseMultiArch()

◆ ParseProvides()

◆ ParseStatus()

bool ParseStatus ( pkgCache::PkgIterator Pkg,
pkgCache::VerIterator Ver 
)
protectedvirtual

Reimplemented in debStatusListParser, edspListParser, and eippListParser.

Definition at line 406 of file deblistparser.cc.

Referenced by UsePackage().

◆ SameVersion()

bool SameVersion ( uint32_t  Hash,
pkgCache::VerIterator const &  Ver 
)
virtual

compare currently parsed version with given version

Parameters
Hashof the currently parsed version
Verto compare with

Reimplemented from pkgCacheListParser.

Definition at line 1008 of file deblistparser.cc.

References pkgTagSection::FindULL(), ParseMultiArch(), pkgCacheListParser::SameVersion(), Section, and Size().

◆ Size()

virtual map_filesize_t Size ( )
inlinevirtual

Implements pkgCacheListParser.

Definition at line 72 of file deblistparser.h.

References pkgTagSection::size().

Referenced by SameVersion().

◆ Step()

bool Step ( )
virtual

Implements pkgCacheListParser.

Definition at line 990 of file deblistparser.cc.

References iOffset, pkgTagFile::Offset(), Section, pkgTagFile::Step(), and Tags.

◆ UsePackage()

◆ Version()

APT::StringView Version ( )
virtual

Implements pkgCacheListParser.

Reimplemented in debTranslationsParser.

Definition at line 113 of file deblistparser.cc.

References pkgTagSection::Find(), and Section.

Referenced by ParseDepends(), and ParseProvides().

◆ VersionHash()

uint32_t VersionHash ( )
virtual

Implements pkgCacheListParser.

Reimplemented in edspLikeListParser.

Definition at line 356 of file deblistparser.cc.

References Depends(), pkgTagSection::Find(), I, isspace_ascii(), Section, and tolower_ascii_unsafe().

Member Data Documentation

◆ forceEssential

std::vector<std::string> forceEssential
private

Definition at line 37 of file deblistparser.h.

Referenced by debListParser(), and UsePackage().

◆ forceImportant

std::vector<std::string> forceImportant
private

Definition at line 38 of file deblistparser.h.

Referenced by debListParser(), and UsePackage().

◆ iOffset

map_filesize_t iOffset
protected

Definition at line 45 of file deblistparser.h.

Referenced by Step().

◆ MD5Buffer

std::string MD5Buffer
private

Definition at line 39 of file deblistparser.h.

Referenced by Description_md5().

◆ myArch

std::string myArch
private

Definition at line 40 of file deblistparser.h.

Referenced by debListParser(), ParseDepends(), and UsePackage().

◆ Section

◆ Tags

pkgTagFile Tags
protected

Definition at line 43 of file deblistparser.h.

Referenced by Step().


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