// Include Files /*{{{*/
#include <iostream>
#include <fstream>
+#include <list>
+#include <map>
#include <set>
#include <string>
};
};
// 103. set::iterator is required to be modifiable, but this allows modification of keys
- typedef typename APT::PackageSet::const_iterator iterator;
+ typedef APT::PackageSet::const_iterator iterator;
using std::set<pkgCache::PkgIterator>::insert;
inline void insert(pkgCache::PkgIterator const &P) { if (P.end() == false) std::set<pkgCache::PkgIterator>::insert(P); };
std::ostream out (std::ofstream("/dev/null").rdbuf());
return APT::PackageSet::FromCommandLine(Cache, cmdline, out);
}
+
+ struct Modifier {
+ enum Position { NONE, PREFIX, POSTFIX };
+ unsigned short ID;
+ const char * const Alias;
+ Position Pos;
+ Modifier (unsigned short const &id, const char * const alias, Position const &pos) : ID(id), Alias(alias), Pos(pos) {};
+ };
+
+ static std::map<unsigned short, PackageSet> GroupedFromCommandLine(
+ pkgCacheFile &Cache, const char **cmdline,
+ std::list<PackageSet::Modifier> const &mods,
+ unsigned short const &fallback, std::ostream &out);
+ static std::map<unsigned short, PackageSet> GroupedFromCommandLine(
+ pkgCacheFile &Cache, const char **cmdline,
+ std::list<PackageSet::Modifier> const &mods,
+ unsigned short const &fallback) {
+ std::ostream out (std::ofstream("/dev/null").rdbuf());
+ return APT::PackageSet::GroupedFromCommandLine(Cache, cmdline,
+ mods, fallback, out);
+ }
/*}}}*/
}; /*}}}*/
class VersionSet : public std::set<pkgCache::VerIterator> { /*{{{*/
inline pkgCache::VerFileIterator NewestFile() const { return (**this).NewestFile(); };
};
// 103. set::iterator is required to be modifiable, but this allows modification of keys
- typedef typename APT::VersionSet::const_iterator iterator;
+ typedef APT::VersionSet::const_iterator iterator;
using std::set<pkgCache::VerIterator>::insert;
inline void insert(pkgCache::VerIterator const &V) { if (V.end() == false) std::set<pkgCache::VerIterator>::insert(V); };