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>
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) |
iterator & | erase (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 |
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.
|
inherited |
specifies which version(s) will be returned if non is given
|
inline |
References APT::VersionContainer< Container >::_cont.
Referenced by APT::VersionContainer< Container >::insert().
|
inline |
References APT::VersionContainer< Container >::_cont.
|
inlinevirtual |
Implements APT::VersionContainerInterface.
References APT::VersionContainer< Container >::_cont.
|
inlinevirtual |
Implements APT::VersionContainerInterface.
References APT::VersionContainer< Container >::_cont.
|
inline |
References APT::VersionContainer< Container >::_cont.
Referenced by APT::VersionContainer< Container >::insert().
|
inline |
References APT::VersionContainer< Container >::_cont.
|
inline |
References APT::VersionContainer< Container >::_cont.
|
inline |
References APT::VersionContainer< Container >::_cont.
|
inline |
References APT::VersionContainer< Container >::_cont.
|
inline |
References APT::VersionContainer< Container >::_cont.
|
inline |
References APT::VersionContainer< Container >::_cont.
|
staticinherited |
Referenced by APT::VersionContainer< Container >::FromCommandLine().
|
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.
Cache | the packages and versions are in |
cmdline | Command line the versions should be extracted from |
helper | responsible for error and message handling |
References APT::VersionContainerInterface::FromCommandLine().
Referenced by APT::VersionContainer< Container >::FromCommandLine().
|
inlinestatic |
References APT::VersionContainer< Container >::FromCommandLine().
|
inlinestatic |
References APT::VersionContainerInterface::CANDINST, and APT::VersionContainer< Container >::FromCommandLine().
|
staticinherited |
Referenced by APT::VersionContainer< Container >::FromDependency().
|
inlinestatic |
References APT::VersionContainerInterface::FromDependency().
|
inlinestatic |
References APT::VersionContainer< Container >::FromPackage().
|
inlinestatic |
References APT::VersionContainerInterface::CANDIDATE, and APT::VersionContainer< Container >::FromPackage().
|
staticinherited |
Referenced by APT::VersionContainer< Container >::GroupedFromCommandLine().
|
staticinherited |
Referenced by APT::VersionContainer< Container >::FromPackage().
|
inlinestatic |
returns all versions specified for the package
Cache | the package and versions are in |
P | the package in question |
fallback | the version(s) you want to get |
helper | the helper used for display and error handling |
References APT::VersionContainerInterface::FromPackage().
Referenced by APT::VersionContainer< Container >::FromDependency(), and APT::VersionContainer< Container >::FromPackage().
|
inlinestatic |
References APT::VersionContainer< Container >::FromPackage().
|
inlinestatic |
References APT::VersionContainerInterface::CANDIDATE, and APT::VersionContainer< Container >::FromPackage().
|
staticinherited |
Referenced by APT::VersionContainer< Container >::FromString().
|
inlinestatic |
References APT::VersionContainerInterface::FromString().
Referenced by APT::VersionContainer< Container >::FromString().
|
inlinestatic |
References APT::VersionContainer< Container >::FromString().
|
inlinestatic |
References APT::VersionContainerInterface::CANDINST, and APT::VersionContainer< Container >::FromString().
|
staticprotectedinherited |
returns the candidate version of the package
Cache | to be used to query for information |
Pkg | we want the candidate version from this package |
|
staticprotectedinherited |
returns the installed version of the package
Cache | to be used to query for information |
Pkg | we want the installed version from this package |
|
inlinestatic |
References APT::VersionContainerInterface::FromModifierCommandLine().
Referenced by APT::VersionContainer< Container >::GroupedFromCommandLine().
|
inlinestatic |
References APT::VersionContainer< Container >::GroupedFromCommandLine().
|
inlinevirtual |
Implements APT::VersionContainerInterface.
References APT::VersionContainer< Container >::_cont, and pkgCache::Iterator< Str, Itr >::end().
|
inline |
References APT::VersionContainer< Container >::_cont, APT::VersionContainer< Container >::begin(), and APT::VersionContainer< Container >::end().
|
inline |
References APT::VersionContainer< Container >::_cont.
void APT::VersionContainer< std::list< pkgCache::VerIterator > >::insert | ( | VersionContainer< Cont > const & | vercont | ) |
References APT::VersionContainer< Container >::begin(), and APT::VersionContainer< Container >::end().
|
inlinevirtual |
Implements APT::VersionContainerInterface.
References pkgCache::Iterator< Str, Itr >::end().
|
inline |
|
inline |
References APT::VersionContainer< Container >::_cont.
|
private |
Referenced by APT::VersionContainer< Container >::begin(), APT::VersionContainer< Container >::clear(), APT::VersionContainer< Container >::empty(), APT::VersionContainer< Container >::end(), APT::VersionContainer< Container >::erase(), APT::VersionContainer< Container >::find(), APT::VersionContainer< Container >::insert(), and APT::VersionContainer< Container >::size().