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)  

CacheSetHelperAPTGet Class Reference

#include <private-cacheset.h>

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

Public Member Functions

 CacheSetHelperAPTGet (std::ostream &out)
 
virtual void showPackageSelection (pkgCache::PkgIterator const &Pkg, enum PkgSelector const select, std::string const &pattern) APT_OVERRIDE
 be notified about the package being selected via pattern More...
 
void showTaskSelection (pkgCache::PkgIterator const &Pkg, std::string const &pattern)
 
void showFnmatchSelection (pkgCache::PkgIterator const &Pkg, std::string const &pattern)
 
void showRegExSelection (pkgCache::PkgIterator const &Pkg, std::string const &pattern)
 
void showVersionSelection (pkgCache::PkgIterator const &Pkg, pkgCache::VerIterator const &Ver, enum VerSelector const select, std::string const &pattern) APT_OVERRIDE
 be notified about the version being selected via pattern More...
 
bool showVirtualPackageErrors (pkgCacheFile &Cache)
 
pkgCache::VerIterator canNotGetVersion (enum VerSelector const select, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) APT_OVERRIDE
 
void canNotFindVersion (enum VerSelector const select, APT::VersionContainerInterface *const vci, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) APT_OVERRIDE
 be notified if a version can't be found for a package More...
 
pkgCache::VerIterator canNotFindCandidateVer (pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg)
 
pkgCache::VerIterator canNotFindNewestVer (pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg)
 
virtual pkgCache::PkgIterator canNotFindPkgName (pkgCacheFile &Cache, std::string const &str) APT_OVERRIDE
 
APT::VersionSet tryVirtualPackage (pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg, CacheSetHelper::VerSelector const select)
 
bool allPkgNamedExplicitly () const
 
- Public Member Functions inherited from CacheSetHelper
 CacheSetHelper (bool const ShowError=true, GlobalError::MsgType ErrorType=GlobalError::ERROR)
 
virtual ~CacheSetHelper ()
 
virtual bool PackageFrom (enum PkgSelector const select, PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string const &pattern)
 
virtual bool PackageFromCommandLine (PackageContainerInterface *const pci, pkgCacheFile &Cache, const char **cmdline)
 
virtual bool PackageFromModifierCommandLine (unsigned short &modID, PackageContainerInterface *const pci, pkgCacheFile &Cache, const char *cmdline, std::list< PkgModifier > const &mods)
 
virtual void canNotFindPackage (enum PkgSelector const select, PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string const &pattern)
 be notified if a package can't be found via pattern More...
 
bool showErrors () const
 
bool showErrors (bool const newValue)
 
GlobalError::MsgType errorType () const
 
GlobalError::MsgType errorType (GlobalError::MsgType const &newValue)
 

Public Attributes

std::list< std::pair< pkgCache::VerIterator, std::string > > selectedByRelease
 
std::set< std::string > notFound
 

Private Attributes

std::ostream & out
 stream message should be printed to More...
 
bool explicitlyNamed
 were things like Task or RegEx used to select packages? More...
 
APT::PackageSet virtualPkgs
 

Additional Inherited Members

- Public Types inherited from CacheSetHelper
enum  PkgSelector {
  UNKNOWN , REGEX , TASK , FNMATCH ,
  PACKAGENAME , STRING , PATTERN
}
 
enum  VerSelector {
  RELEASE , VERSIONNUMBER , ALL , CANDANDINST ,
  CANDIDATE , INSTALLED , CANDINST , INSTCAND ,
  NEWEST
}
 specifies which version(s) we want to refer to More...
 
- Protected Member Functions inherited from CacheSetHelper
pkgCache::VerIterator canNotGetInstCandVer (pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg)
 
pkgCache::VerIterator canNotGetCandInstVer (pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg)
 
bool PackageFromTask (PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string pattern)
 
bool PackageFromRegEx (PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string pattern)
 
bool PackageFromFnmatch (PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string pattern)
 
bool PackageFromPackageName (PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string pattern)
 
bool PackageFromString (PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string const &pattern)
 
bool PackageFromPattern (PackageContainerInterface *const pci, pkgCacheFile &Cache, std::string const &pattern)
 
- Protected Attributes inherited from CacheSetHelper
bool ShowError
 
GlobalError::MsgType ErrorType
 

Detailed Description

Definition at line 97 of file private-cacheset.h.

Constructor & Destructor Documentation

◆ CacheSetHelperAPTGet()

CacheSetHelperAPTGet ( std::ostream &  out)
explicit

Definition at line 186 of file private-cacheset.cc.

References explicitlyNamed.

Member Function Documentation

◆ allPkgNamedExplicitly()

bool allPkgNamedExplicitly ( ) const
inline

Definition at line 126 of file private-cacheset.h.

References explicitlyNamed.

◆ canNotFindCandidateVer()

◆ canNotFindNewestVer()

◆ canNotFindPkgName()

pkgCache::PkgIterator canNotFindPkgName ( pkgCacheFile Cache,
std::string const &  str 
)
virtual

◆ canNotFindVersion()

void canNotFindVersion ( enum VerSelector const  select,
APT::VersionContainerInterface *const  vci,
pkgCacheFile Cache,
pkgCache::PkgIterator const &  Pkg 
)
virtual

be notified if a version can't be found for a package

Main use is probably to show a message to the user what happened

Parameters
selectis the method tried for selection
vciis the container the version should be inserted in
Cacheis the package universe available
Pkgis the package we wanted a version from

Reimplemented from CacheSetHelper.

Definition at line 312 of file private-cacheset.cc.

References CacheSetHelper::CANDIDATE, canNotFindCandidateVer(), canNotFindNewestVer(), CacheSetHelper::canNotFindVersion(), and CacheSetHelper::NEWEST.

◆ canNotGetVersion()

pkgCache::VerIterator canNotGetVersion ( enum VerSelector const  select,
pkgCacheFile Cache,
pkgCache::PkgIterator const &  Pkg 
)
virtual

◆ showFnmatchSelection()

void showFnmatchSelection ( pkgCache::PkgIterator const &  Pkg,
std::string const &  pattern 
)

Definition at line 216 of file private-cacheset.cc.

References explicitlyNamed, ioprintf(), and out.

Referenced by showPackageSelection().

◆ showPackageSelection()

void showPackageSelection ( pkgCache::PkgIterator const &  pkg,
enum PkgSelector const  select,
std::string const &  pattern 
)
virtual

be notified about the package being selected via pattern

Main use is probably to show a message to the user what happened

Parameters
pkgis the package which was selected
selectis the selection method which choose the package
patternis the string used by the selection method to pick the package

Reimplemented from CacheSetHelper.

Definition at line 191 of file private-cacheset.cc.

References CacheSetHelper::FNMATCH, CacheSetHelper::REGEX, showFnmatchSelection(), CacheSetHelper::showPackageSelection(), showRegExSelection(), showTaskSelection(), and CacheSetHelper::TASK.

◆ showRegExSelection()

void showRegExSelection ( pkgCache::PkgIterator const &  Pkg,
std::string const &  pattern 
)

Definition at line 222 of file private-cacheset.cc.

References explicitlyNamed, ioprintf(), and out.

Referenced by showPackageSelection().

◆ showTaskSelection()

void showTaskSelection ( pkgCache::PkgIterator const &  Pkg,
std::string const &  pattern 
)

Definition at line 210 of file private-cacheset.cc.

References explicitlyNamed, ioprintf(), and out.

Referenced by showPackageSelection().

◆ showVersionSelection()

void showVersionSelection ( pkgCache::PkgIterator const &  Pkg,
pkgCache::VerIterator const &  Ver,
enum VerSelector const  select,
std::string const &  pattern 
)
virtual

be notified about the version being selected via pattern

Main use is probably to show a message to the user what happened Note that at the moment this method is only called for RELEASE and VERSION selections, not for the others.

Parameters
Pkgis the package which was selected for
Veris the version selected
selectis the selection method which choose the version
patternis the string used by the selection method to pick the version

Reimplemented from CacheSetHelper.

Definition at line 228 of file private-cacheset.cc.

References CacheSetHelper::RELEASE, selectedByRelease, CacheSetHelper::showVersionSelection(), and CacheSetHelper::VERSIONNUMBER.

◆ showVirtualPackageErrors()

◆ tryVirtualPackage()

Member Data Documentation

◆ explicitlyNamed

bool explicitlyNamed
private

were things like Task or RegEx used to select packages?

Definition at line 101 of file private-cacheset.h.

Referenced by allPkgNamedExplicitly(), CacheSetHelperAPTGet(), showFnmatchSelection(), showRegExSelection(), and showTaskSelection().

◆ notFound

std::set<std::string> notFound

Definition at line 106 of file private-cacheset.h.

Referenced by canNotFindPkgName(), and DoCacheManipulationFromCommandLine().

◆ out

std::ostream& out
private

◆ selectedByRelease

std::list<std::pair<pkgCache::VerIterator, std::string> > selectedByRelease

Definition at line 105 of file private-cacheset.h.

Referenced by DoCacheManipulationFromCommandLine(), and showVersionSelection().

◆ virtualPkgs

APT::PackageSet virtualPkgs
private

Definition at line 103 of file private-cacheset.h.

Referenced by canNotFindCandidateVer(), and showVirtualPackageErrors().


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