libapt-pkg-dev  v0.9.7.5ubuntu5.4
Debian+Ubuntu APT Package Management
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
APT::VersionContainer< Container > Class Template Reference

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

#include <cacheset.h>

Inheritance diagram for APT::VersionContainer< Container >:
Collaboration diagram for APT::VersionContainer< Container >:

Classes

class  const_iterator
 smell like a pkgCache::VerIterator More...
 
class  iterator
 

Public Types

enum  Version {
  ALL,
  CANDANDINST,
  CANDIDATE,
  INSTALLED,
  CANDINST,
  INSTCAND,
  NEWEST
}
 specifies which version(s) will be returned if non is given More...
 

Public Member Functions

const_iterator begin () const
 
iterator begin ()
 
void clear ()
 
bool empty () const
 
const_iterator end () const
 
iterator end ()
 
void erase (iterator position)
 
iteratorerase (iterator &position, bool)
 
size_t erase (const pkgCache::VerIterator x)
 
void erase (iterator first, iterator last)
 
const_iterator find (pkgCache::VerIterator const &V) const
 
bool insert (pkgCache::VerIterator const &V)
 
template<class Cont >
void insert (VersionContainer< Cont > const &vercont)
 
void insert (const_iterator begin, const_iterator end)
 
template<>
void insert (VersionContainer< Cont > const &vercont)
 
template<>
bool insert (pkgCache::VerIterator const &V)
 
template<>
void insert (const_iterator begin, const_iterator end)
 
size_t size () const
 

Static Public Member Functions

static bool FromCommandLine (VersionContainerInterface *const vci, pkgCacheFile &Cache, const char **cmdline, Version const &fallback, CacheSetHelper &helper)
 
static VersionContainer FromCommandLine (pkgCacheFile &Cache, const char **cmdline, Version const &fallback, CacheSetHelper &helper)
 returns all versions specified on the commandline More...
 
static VersionContainer FromCommandLine (pkgCacheFile &Cache, const char **cmdline, Version const &fallback)
 
static VersionContainer FromCommandLine (pkgCacheFile &Cache, const char **cmdline)
 
static bool FromDependency (VersionContainerInterface *const vci, pkgCacheFile &Cache, pkgCache::DepIterator const &D, Version const &selector, CacheSetHelper &helper)
 
static VersionContainer FromDependency (pkgCacheFile &Cache, pkgCache::DepIterator const &D, Version const &selector, CacheSetHelper &helper)
 
static VersionContainer FromDependency (pkgCacheFile &Cache, pkgCache::DepIterator const &D, Version const &selector)
 
static VersionContainer FromDependency (pkgCacheFile &Cache, pkgCache::DepIterator const &D)
 
static bool FromModifierCommandLine (unsigned short &modID, VersionContainerInterface *const vci, pkgCacheFile &Cache, const char *cmdline, std::list< Modifier > const &mods, CacheSetHelper &helper)
 
static bool FromPackage (VersionContainerInterface *const vci, pkgCacheFile &Cache, pkgCache::PkgIterator const &P, Version const &fallback, CacheSetHelper &helper)
 
static VersionContainer FromPackage (pkgCacheFile &Cache, pkgCache::PkgIterator const &P, Version const &fallback, CacheSetHelper &helper)
 returns all versions specified for the package More...
 
static VersionContainer FromPackage (pkgCacheFile &Cache, pkgCache::PkgIterator const &P, Version const &fallback)
 
static VersionContainer FromPackage (pkgCacheFile &Cache, pkgCache::PkgIterator const &P)
 
static bool FromString (VersionContainerInterface *const vci, pkgCacheFile &Cache, std::string pkg, Version const &fallback, CacheSetHelper &helper, bool const onlyFromName=false)
 
static VersionContainer FromString (pkgCacheFile &Cache, std::string const &pkg, Version const &fallback, CacheSetHelper &helper, bool const onlyFromName=false)
 
static VersionContainer FromString (pkgCacheFile &Cache, std::string pkg, Version const &fallback)
 
static VersionContainer FromString (pkgCacheFile &Cache, std::string pkg)
 
static std::map< unsigned
short, VersionContainer
GroupedFromCommandLine (pkgCacheFile &Cache, const char **cmdline, std::list< Modifier > const &mods, unsigned short const fallback, CacheSetHelper &helper)
 
static std::map< unsigned
short, VersionContainer
GroupedFromCommandLine (pkgCacheFile &Cache, const char **cmdline, std::list< 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 More...
 
static pkgCache::VerIterator getInstalledVer (pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg, CacheSetHelper &helper)
 returns the installed version of the package More...
 

Private Attributes

Container _cont
 

Detailed Description

template<class Container>
class APT::VersionContainer< Container >

Simple wrapper around a container class like 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

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

template<class Container>
const_iterator APT::VersionContainer< Container >::begin ( ) const
inline

References APT::VersionContainer< Container >::_cont.

Referenced by APT::VersionContainer< Container >::insert().

Here is the caller graph for this function:

template<class Container>
iterator APT::VersionContainer< Container >::begin ( )
inline
template<class Container>
void APT::VersionContainer< Container >::clear ( )
inlinevirtual
template<class Container>
bool APT::VersionContainer< Container >::empty ( ) const
inlinevirtual
template<class Container>
const_iterator APT::VersionContainer< Container >::end ( ) const
inline

References APT::VersionContainer< Container >::_cont.

Referenced by APT::VersionContainer< Container >::insert().

Here is the caller graph for this function:

template<class Container>
iterator APT::VersionContainer< Container >::end ( )
inline
template<class Container>
void APT::VersionContainer< Container >::erase ( iterator  position)
inline
template<class Container>
iterator& APT::VersionContainer< Container >::erase ( iterator position,
bool   
)
inline
template<class Container>
size_t APT::VersionContainer< Container >::erase ( const pkgCache::VerIterator  x)
inline
template<class Container>
void APT::VersionContainer< Container >::erase ( iterator  first,
iterator  last 
)
inline
template<class Container>
const_iterator APT::VersionContainer< Container >::find ( pkgCache::VerIterator const &  V) const
inline
static bool APT::VersionContainerInterface::FromCommandLine ( VersionContainerInterface *const  vci,
pkgCacheFile Cache,
const char **  cmdline,
Version const &  fallback,
CacheSetHelper helper 
)
staticinherited

Referenced by APT::VersionContainer< Container >::FromCommandLine().

Here is the caller graph for this function:

template<class Container>
static VersionContainer APT::VersionContainer< Container >::FromCommandLine ( pkgCacheFile Cache,
const char **  cmdline,
Version const &  fallback,
CacheSetHelper helper 
)
inlinestatic

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

References APT::VersionContainerInterface::FromCommandLine().

Referenced by APT::VersionContainer< Container >::FromCommandLine().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Container>
static VersionContainer APT::VersionContainer< Container >::FromCommandLine ( pkgCacheFile Cache,
const char **  cmdline,
Version const &  fallback 
)
inlinestatic

References APT::VersionContainer< Container >::FromCommandLine().

Here is the call graph for this function:

template<class Container>
static VersionContainer APT::VersionContainer< Container >::FromCommandLine ( pkgCacheFile Cache,
const char **  cmdline 
)
inlinestatic

References APT::VersionContainerInterface::CANDINST, and APT::VersionContainer< Container >::FromCommandLine().

Here is the call graph for this function:

static bool APT::VersionContainerInterface::FromDependency ( VersionContainerInterface *const  vci,
pkgCacheFile Cache,
pkgCache::DepIterator const &  D,
Version const &  selector,
CacheSetHelper helper 
)
staticinherited

Referenced by APT::VersionContainer< Container >::FromDependency().

Here is the caller graph for this function:

template<class Container>
static VersionContainer APT::VersionContainer< Container >::FromDependency ( pkgCacheFile Cache,
pkgCache::DepIterator const &  D,
Version const &  selector,
CacheSetHelper helper 
)
inlinestatic

References APT::VersionContainerInterface::FromDependency().

Here is the call graph for this function:

template<class Container>
static VersionContainer APT::VersionContainer< Container >::FromDependency ( pkgCacheFile Cache,
pkgCache::DepIterator const &  D,
Version const &  selector 
)
inlinestatic

References APT::VersionContainer< Container >::FromPackage().

Here is the call graph for this function:

template<class Container>
static VersionContainer APT::VersionContainer< Container >::FromDependency ( pkgCacheFile Cache,
pkgCache::DepIterator const &  D 
)
inlinestatic

References APT::VersionContainerInterface::CANDIDATE, and APT::VersionContainer< Container >::FromPackage().

Here is the call graph for this function:

static bool APT::VersionContainerInterface::FromModifierCommandLine ( unsigned short &  modID,
VersionContainerInterface *const  vci,
pkgCacheFile Cache,
const char *  cmdline,
std::list< Modifier > const &  mods,
CacheSetHelper helper 
)
staticinherited

Referenced by APT::VersionContainer< Container >::GroupedFromCommandLine().

Here is the caller graph for this function:

static bool APT::VersionContainerInterface::FromPackage ( VersionContainerInterface *const  vci,
pkgCacheFile Cache,
pkgCache::PkgIterator const &  P,
Version const &  fallback,
CacheSetHelper helper 
)
staticinherited

Referenced by APT::VersionContainer< Container >::FromPackage().

Here is the caller graph for this function:

template<class Container>
static VersionContainer APT::VersionContainer< Container >::FromPackage ( pkgCacheFile Cache,
pkgCache::PkgIterator const &  P,
Version const &  fallback,
CacheSetHelper helper 
)
inlinestatic

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 APT::VersionContainerInterface::FromPackage().

Referenced by APT::VersionContainer< Container >::FromDependency(), and APT::VersionContainer< Container >::FromPackage().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Container>
static VersionContainer APT::VersionContainer< Container >::FromPackage ( pkgCacheFile Cache,
pkgCache::PkgIterator const &  P,
Version const &  fallback 
)
inlinestatic

References APT::VersionContainer< Container >::FromPackage().

Here is the call graph for this function:

template<class Container>
static VersionContainer APT::VersionContainer< Container >::FromPackage ( pkgCacheFile Cache,
pkgCache::PkgIterator const &  P 
)
inlinestatic

References APT::VersionContainerInterface::CANDIDATE, and APT::VersionContainer< Container >::FromPackage().

Here is the call graph for this function:

static bool APT::VersionContainerInterface::FromString ( VersionContainerInterface *const  vci,
pkgCacheFile Cache,
std::string  pkg,
Version const &  fallback,
CacheSetHelper helper,
bool const  onlyFromName = false 
)
staticinherited

Referenced by APT::VersionContainer< Container >::FromString().

Here is the caller graph for this function:

template<class Container>
static VersionContainer APT::VersionContainer< Container >::FromString ( pkgCacheFile Cache,
std::string const &  pkg,
Version const &  fallback,
CacheSetHelper helper,
bool const  onlyFromName = false 
)
inlinestatic

References APT::VersionContainerInterface::FromString().

Referenced by APT::VersionContainer< Container >::FromString().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Container>
static VersionContainer APT::VersionContainer< Container >::FromString ( pkgCacheFile Cache,
std::string  pkg,
Version const &  fallback 
)
inlinestatic

References APT::VersionContainer< Container >::FromString().

Here is the call graph for this function:

template<class Container>
static VersionContainer APT::VersionContainer< Container >::FromString ( pkgCacheFile Cache,
std::string  pkg 
)
inlinestatic

References APT::VersionContainerInterface::CANDINST, and APT::VersionContainer< Container >::FromString().

Here is the call graph for this function:

static pkgCache::VerIterator APT::VersionContainerInterface::getCandidateVer ( pkgCacheFile Cache,
pkgCache::PkgIterator const &  Pkg,
CacheSetHelper helper 
)
staticprotectedinherited

returns the candidate version of the package

Parameters
Cacheto be used to query for information
Pkgwe want the candidate version from this package
static pkgCache::VerIterator APT::VersionContainerInterface::getInstalledVer ( pkgCacheFile Cache,
pkgCache::PkgIterator const &  Pkg,
CacheSetHelper helper 
)
staticprotectedinherited

returns the installed version of the package

Parameters
Cacheto be used to query for information
Pkgwe want the installed version from this package
template<class Container>
static std::map<unsigned short, VersionContainer> APT::VersionContainer< Container >::GroupedFromCommandLine ( pkgCacheFile Cache,
const char **  cmdline,
std::list< Modifier > const &  mods,
unsigned short const  fallback,
CacheSetHelper helper 
)
inlinestatic

References APT::VersionContainerInterface::FromModifierCommandLine().

Referenced by APT::VersionContainer< Container >::GroupedFromCommandLine().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Container>
static std::map<unsigned short, VersionContainer> APT::VersionContainer< Container >::GroupedFromCommandLine ( pkgCacheFile Cache,
const char **  cmdline,
std::list< Modifier > const &  mods,
unsigned short const  fallback 
)
inlinestatic

References APT::VersionContainer< Container >::GroupedFromCommandLine().

Here is the call graph for this function:

template<class Container>
bool APT::VersionContainer< Container >::insert ( pkgCache::VerIterator const &  V)
inlinevirtual

Implements APT::VersionContainerInterface.

References APT::VersionContainer< Container >::_cont, and pkgCache::Iterator< Str, Itr >::end().

Here is the call graph for this function:

template<class Container>
template<class Cont >
void APT::VersionContainer< Container >::insert ( VersionContainer< Cont > const &  vercont)
inline
template<class Container>
void APT::VersionContainer< Container >::insert ( const_iterator  begin,
const_iterator  end 
)
inline
template<>
void APT::VersionContainer< std::list< pkgCache::VerIterator > >::insert ( VersionContainer< Cont > const &  vercont)

References APT::VersionContainer< Container >::begin(), and APT::VersionContainer< Container >::end().

Here is the call graph for this function:

template<>
bool APT::VersionContainer< std::list< pkgCache::VerIterator > >::insert ( pkgCache::VerIterator const &  V)
inlinevirtual

Implements APT::VersionContainerInterface.

References pkgCache::Iterator< Str, Itr >::end().

Here is the call graph for this function:

template<>
void APT::VersionContainer< std::list< pkgCache::VerIterator > >::insert ( const_iterator  begin,
const_iterator  end 
)
inline
template<class Container>
size_t APT::VersionContainer< Container >::size ( ) const
inline

Member Data Documentation


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