+ const_iterator begin() const { return const_iterator(_cont.begin()); };
+ const_iterator end() const { return const_iterator(_cont.end()); };
+ iterator begin() { return iterator(_cont.begin()); };
+ iterator end() { return iterator(_cont.end()); };
+ const_iterator find(pkgCache::VerIterator const &V) const { return const_iterator(_cont.find(V)); };
+
+ /** \brief 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.
+ \param Cache the packages and versions are in
+ \param cmdline Command line the versions should be extracted from
+ \param helper responsible for error and message handling */
+ static VersionContainer FromCommandLine(pkgCacheFile &Cache, const char **cmdline,
+ Version const &fallback, CacheSetHelper &helper) {
+ VersionContainer vercon;
+ VersionContainerInterface::FromCommandLine(&vercon, Cache, cmdline, fallback, helper);
+ return vercon;
+ }
+ static VersionContainer FromCommandLine(pkgCacheFile &Cache, const char **cmdline,
+ Version const &fallback) {
+ CacheSetHelper helper;
+ return FromCommandLine(Cache, cmdline, fallback, helper);
+ }
+ static VersionContainer FromCommandLine(pkgCacheFile &Cache, const char **cmdline) {
+ return FromCommandLine(Cache, cmdline, CANDINST);
+ }
+
+ static VersionContainer FromString(pkgCacheFile &Cache, std::string const &pkg,
+ Version const &fallback, CacheSetHelper &helper,
+ bool const onlyFromName = false) {
+ VersionContainer vercon;
+ VersionContainerInterface::FromString(&vercon, Cache, pkg, fallback, helper);
+ return vercon;
+ }
+ static VersionContainer FromString(pkgCacheFile &Cache, std::string pkg,
+ Version const &fallback) {
+ CacheSetHelper helper;
+ return FromString(Cache, pkg, fallback, helper);
+ }
+ static VersionContainer FromString(pkgCacheFile &Cache, std::string pkg) {
+ return FromString(Cache, pkg, CANDINST);
+ }
+
+ /** \brief returns all versions specified for the package
+
+ \param Cache the package and versions are in
+ \param P the package in question
+ \param fallback the version(s) you want to get
+ \param helper the helper used for display and error handling */
+ static VersionContainer FromPackage(pkgCacheFile &Cache, pkgCache::PkgIterator const &P,
+ Version const &fallback, CacheSetHelper &helper) {
+ VersionContainer vercon;
+ VersionContainerInterface::FromPackage(&vercon, Cache, P, fallback, helper);
+ return vercon;
+ }
+ static VersionContainer FromPackage(pkgCacheFile &Cache, pkgCache::PkgIterator const &P,
+ Version const &fallback) {
+ CacheSetHelper helper;
+ return FromPackage(Cache, P, fallback, helper);
+ }
+ static VersionContainer FromPackage(pkgCacheFile &Cache, pkgCache::PkgIterator const &P) {
+ return FromPackage(Cache, P, CANDIDATE);
+ }
+
+ static std::map<unsigned short, VersionContainer> GroupedFromCommandLine(
+ pkgCacheFile &Cache,
+ const char **cmdline,
+ std::list<Modifier> const &mods,
+ unsigned short const fallback,
+ CacheSetHelper &helper) {
+ std::map<unsigned short, VersionContainer> versets;
+ for (const char **I = cmdline; *I != 0; ++I) {
+ unsigned short modID = fallback;
+ VersionContainer verset;
+ VersionContainerInterface::FromModifierCommandLine(modID, &verset, Cache, *I, mods, helper);
+ versets[modID].insert(verset);
+ }
+ return versets;
+
+ }
+ static std::map<unsigned short, VersionContainer> GroupedFromCommandLine(
+ pkgCacheFile &Cache, const char **cmdline,
+ std::list<Modifier> const &mods,
+ unsigned short const fallback) {
+ CacheSetHelper helper;
+ return GroupedFromCommandLine(Cache, cmdline,
+ mods, fallback, helper);
+ }
+
+ static VersionContainer FromDependency(pkgCacheFile &Cache, pkgCache::DepIterator const &D,
+ Version const &selector, CacheSetHelper &helper) {
+ VersionContainer vercon;
+ VersionContainerInterface::FromDependency(&vercon, Cache, D, selector, helper);
+ return vercon;
+ }
+ static VersionContainer FromDependency(pkgCacheFile &Cache, pkgCache::DepIterator const &D,
+ Version const &selector) {
+ CacheSetHelper helper;
+ return FromPackage(Cache, D, selector, helper);
+ }
+ static VersionContainer FromDependency(pkgCacheFile &Cache, pkgCache::DepIterator const &D) {
+ return FromPackage(Cache, D, CANDIDATE);
+ }