apt @VERSION@
|
Inherits std::set< pkgCache::PkgIterator >.
Classes | |
class | const_iterator |
smell like a pkgCache::PkgIterator More... | |
struct | Modifier |
Public Types | |
enum | Constructor { UNKNOWN, REGEX, TASK } |
typedef APT::PackageSet::const_iterator | iterator |
Public Member Functions | |
void | insert (pkgCache::PkgIterator const &P) |
void | insert (PackageSet const &pkgset) |
Constructor | getConstructor () const |
PackageSet (Constructor const &by) | |
Static Public Member Functions | |
static APT::PackageSet | FromTask (pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) |
returns all packages in the cache who belong to the given task | |
static APT::PackageSet | FromTask (pkgCacheFile &Cache, std::string const &pattern) |
static APT::PackageSet | FromRegEx (pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) |
returns all packages in the cache whose name matchs a given pattern | |
static APT::PackageSet | FromRegEx (pkgCacheFile &Cache, std::string const &pattern) |
static APT::PackageSet | FromString (pkgCacheFile &Cache, std::string const &string, CacheSetHelper &helper) |
returns all packages specified by a string | |
static APT::PackageSet | FromString (pkgCacheFile &Cache, std::string const &string) |
static pkgCache::PkgIterator | FromName (pkgCacheFile &Cache, std::string const &string, CacheSetHelper &helper) |
returns a package specified by a string | |
static pkgCache::PkgIterator | FromName (pkgCacheFile &Cache, std::string const &string) |
static APT::PackageSet | FromCommandLine (pkgCacheFile &Cache, const char **cmdline, CacheSetHelper &helper) |
returns all packages specified on the commandline | |
static APT::PackageSet | FromCommandLine (pkgCacheFile &Cache, const char **cmdline) |
static std::map< unsigned short, PackageSet > | GroupedFromCommandLine (pkgCacheFile &Cache, const char **cmdline, std::list< PackageSet::Modifier > const &mods, unsigned short const &fallback, CacheSetHelper &helper) |
group packages by a action modifiers | |
static std::map< unsigned short, PackageSet > | GroupedFromCommandLine (pkgCacheFile &Cache, const char **cmdline, std::list< PackageSet::Modifier > const &mods, unsigned short const &fallback) |
Simple wrapper around a std::set to provide a similar interface to a set of packages as to the complete set of all packages in the pkgCache.
PackageSet FromCommandLine | ( | pkgCacheFile & | Cache, |
const char ** | cmdline, | ||
CacheSetHelper & | helper | ||
) | [static] |
returns all packages specified on the commandline
Get all package names from the commandline and executes regex's if needed. No special package command is supported, just plain names.
Cache | the packages are in |
cmdline | Command line the package names should be extracted from |
helper | responsible for error and message handling |
References PackageSet::FromString().
pkgCache::PkgIterator FromName | ( | pkgCacheFile & | Cache, |
std::string const & | string, | ||
CacheSetHelper & | helper | ||
) | [static] |
returns a package specified by a string
Cache | the package is in |
string | String the package name should be extracted from |
helper | responsible for error and message handling |
References pkgCache::GrpIterator::FindPreferredPkg().
Referenced by PackageSet::FromString(), and PackageSet::GroupedFromCommandLine().
PackageSet FromRegEx | ( | pkgCacheFile & | Cache, |
std::string | pattern, | ||
CacheSetHelper & | helper | ||
) | [static] |
returns all packages in the cache whose name matchs a given pattern
A simple helper responsible for executing a regular expression on all package names in the cache. Optional it prints a a notice about the packages chosen cause of the given package.
Cache | the packages are in |
pattern | regular expression for package names |
helper | responsible for error and message handling |
References Configuration::getArchitectures().
Referenced by PackageSet::FromString().
PackageSet FromString | ( | pkgCacheFile & | Cache, |
std::string const & | string, | ||
CacheSetHelper & | helper | ||
) | [static] |
returns all packages specified by a string
Cache | the packages are in |
string | String the package name(s) should be extracted from |
helper | responsible for error and message handling |
References PackageSet::FromName(), PackageSet::FromRegEx(), and PackageSet::FromTask().
Referenced by PackageSet::FromCommandLine(), and PackageSet::GroupedFromCommandLine().
PackageSet FromTask | ( | pkgCacheFile & | Cache, |
std::string | pattern, | ||
CacheSetHelper & | helper | ||
) | [static] |
returns all packages in the cache who belong to the given task
A simple helper responsible for search for all members of a task in the cache. Optional it prints a a notice about the packages chosen cause of the given task.
Cache | the packages are in |
pattern | name of the task |
helper | responsible for error and message handling |
Referenced by PackageSet::FromString().
std::map< unsigned short, PackageSet > GroupedFromCommandLine | ( | pkgCacheFile & | Cache, |
const char ** | cmdline, | ||
std::list< PackageSet::Modifier > const & | mods, | ||
unsigned short const & | fallback, | ||
CacheSetHelper & | helper | ||
) | [static] |
group packages by a action modifiers
At some point it is needed to get from the same commandline different package sets grouped by a modifier. Take apt-get install apt awesome- as an example.
Cache | the packages are in |
cmdline | Command line the package names should be extracted from |
mods | list of modifiers the method should accept |
fallback | the default modifier group for a package |
helper | responsible for error and message handling |
References PackageSet::FromName(), and PackageSet::FromString().