apt @VERSION@
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Protected Member Functions

VersionSet Class Reference

Inherits std::set< pkgCache::VerIterator >.

List of all members.

Classes

class  const_iterator
 smell like a pkgCache::VerIterator More...
struct  Modifier

Public Types

enum  Version {
  ALL, CANDANDINST, CANDIDATE, INSTALLED,
  CANDINST, INSTCAND, NEWEST
}
 

specifies which version(s) will be returned if non is given

More...
typedef
APT::VersionSet::const_iterator 
iterator

Public Member Functions

void insert (pkgCache::VerIterator const &V)
void insert (VersionSet const &verset)

Static Public Member Functions

static APT::VersionSet FromCommandLine (pkgCacheFile &Cache, const char **cmdline, APT::VersionSet::Version const &fallback, CacheSetHelper &helper)
 returns all versions specified on the commandline
static APT::VersionSet FromCommandLine (pkgCacheFile &Cache, const char **cmdline, APT::VersionSet::Version const &fallback)
static APT::VersionSet FromCommandLine (pkgCacheFile &Cache, const char **cmdline)
static APT::VersionSet FromString (pkgCacheFile &Cache, std::string pkg, APT::VersionSet::Version const &fallback, CacheSetHelper &helper, bool const &onlyFromName=false)
static APT::VersionSet FromString (pkgCacheFile &Cache, std::string pkg, APT::VersionSet::Version const &fallback)
static APT::VersionSet FromString (pkgCacheFile &Cache, std::string pkg)
static APT::VersionSet FromPackage (pkgCacheFile &Cache, pkgCache::PkgIterator const &P, VersionSet::Version const &fallback, CacheSetHelper &helper)
 returns all versions specified for the package
static APT::VersionSet FromPackage (pkgCacheFile &Cache, pkgCache::PkgIterator const &P, APT::VersionSet::Version const &fallback)
static APT::VersionSet FromPackage (pkgCacheFile &Cache, pkgCache::PkgIterator const &P)
static std::map< unsigned
short, VersionSet
GroupedFromCommandLine (pkgCacheFile &Cache, const char **cmdline, std::list< VersionSet::Modifier > const &mods, unsigned short const &fallback, CacheSetHelper &helper)
static std::map< unsigned
short, VersionSet
GroupedFromCommandLine (pkgCacheFile &Cache, const char **cmdline, std::list< VersionSet::Modifier > const &mods, unsigned short const &fallback)

Static Protected Member Functions

static pkgCache::VerIterator getCandidateVer (pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg, CacheSetHelper &helper)
 returns the candidate version of the package
static pkgCache::VerIterator getInstalledVer (pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg, CacheSetHelper &helper)
 returns the installed version of the package

Detailed Description

Simple wrapper around a std::set to provide a similar interface to a set of versions as to the complete set of all versions in the pkgCache.


Member Enumeration Documentation

enum Version

specifies which version(s) will be returned if non is given

Enumerator:
ALL 

All versions

CANDANDINST 

Candidate and installed version

CANDIDATE 

Candidate version

INSTALLED 

Installed version

CANDINST 

Candidate or if non installed version

INSTCAND 

Installed or if non candidate version

NEWEST 

Newest version


Member Function Documentation

APT::VersionSet FromCommandLine ( pkgCacheFile Cache,
const char **  cmdline,
APT::VersionSet::Version const &  fallback,
CacheSetHelper helper 
) [static]

returns all versions specified on the commandline

Get all versions from the commandline, uses given default version if non specifically requested and executes regex's if needed on names.

Parameters:
Cachethe packages and versions are in
cmdlineCommand line the versions should be extracted from
helperresponsible for error and message handling
VersionSet FromPackage ( pkgCacheFile Cache,
pkgCache::PkgIterator const &  P,
VersionSet::Version const &  fallback,
CacheSetHelper helper 
) [static]

returns all versions specified for the package

Parameters:
Cachethe package and versions are in
Pthe package in question
fallbackthe version(s) you want to get
helperthe helper used for display and error handling

References VersionSet::ALL, VersionSet::CANDANDINST, VersionSet::CANDIDATE, VersionSet::CANDINST, VersionSet::getCandidateVer(), VersionSet::getInstalledVer(), VersionSet::INSTALLED, VersionSet::INSTCAND, and VersionSet::NEWEST.

pkgCache::VerIterator getCandidateVer ( pkgCacheFile Cache,
pkgCache::PkgIterator const &  Pkg,
CacheSetHelper helper 
) [static, protected]

returns the candidate version of the package

Parameters:
Cacheto be used to query for information
Pkgwe want the candidate version from this package

Referenced by VersionSet::FromPackage().

pkgCache::VerIterator getInstalledVer ( pkgCacheFile Cache,
pkgCache::PkgIterator const &  Pkg,
CacheSetHelper helper 
) [static, protected]

returns the installed version of the package

Parameters:
Cacheto be used to query for information
Pkgwe want the installed version from this package

Referenced by VersionSet::FromPackage().


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