summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcachegen.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-07-20 10:17:29 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-08-10 17:27:59 +0200
commitc9443c01208377f0cba9706412ea3a98ad97b56d (patch)
treee324eb72ee264cc41d92d5c7fc78af77351f6b88 /apt-pkg/pkgcachegen.cc
parent5465192b9aeb1ccea778950ccf2d1b7b32f2cd91 (diff)
elimate duplicated code in pkgIndexFile subclasses
Trade deduplication of code for a bunch of new virtuals, so it is actually visible how the different indexes behave cleaning up the interface at large in the process. Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r--apt-pkg/pkgcachegen.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 9529f42dc..cf845b0fb 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -1051,7 +1051,7 @@ bool pkgCacheGenerator::NewDepends(pkgCache::PkgIterator &Pkg,
// ---------------------------------------------------------------------
/* This creates a Group and the Package to link this dependency to if
needed and handles also the caching of the old endpoint */
-bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator &Ver,
+bool pkgCacheListParser::NewDepends(pkgCache::VerIterator &Ver,
const string &PackageName,
const string &Arch,
const string &Version,
@@ -1077,7 +1077,7 @@ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator &Ver,
if (idxVersion == 0)
{
- idxVersion = StoreString(VERSIONNUMBER, Version);
+ idxVersion = StoreString(pkgCacheGenerator::VERSIONNUMBER, Version);
if (unlikely(idxVersion == 0))
return false;
}
@@ -1124,7 +1124,7 @@ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator &Ver,
}
/*}}}*/
// ListParser::NewProvides - Create a Provides element /*{{{*/
-bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator &Ver,
+bool pkgCacheListParser::NewProvides(pkgCache::VerIterator &Ver,
const string &PkgName,
const string &PkgArch,
const string &Version,
@@ -1145,7 +1145,7 @@ bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator &Ver,
map_stringitem_t idxProvideVersion = 0;
if (Version.empty() == false) {
- idxProvideVersion = StoreString(VERSIONNUMBER, Version);
+ idxProvideVersion = StoreString(pkgCacheGenerator::VERSIONNUMBER, Version);
if (unlikely(idxProvideVersion == 0))
return false;
}
@@ -1178,7 +1178,7 @@ bool pkgCacheGenerator::NewProvides(pkgCache::VerIterator &Ver,
}
/*}}}*/
// ListParser::NewProvidesAllArch - add provides for all architectures /*{{{*/
-bool pkgCacheGenerator::ListParser::NewProvidesAllArch(pkgCache::VerIterator &Ver, string const &Package,
+bool pkgCacheListParser::NewProvidesAllArch(pkgCache::VerIterator &Ver, string const &Package,
string const &Version, uint8_t const Flags) {
pkgCache &Cache = Owner->Cache;
pkgCache::GrpIterator const Grp = Cache.FindGrp(Package);
@@ -1188,7 +1188,7 @@ bool pkgCacheGenerator::ListParser::NewProvidesAllArch(pkgCache::VerIterator &Ve
{
map_stringitem_t idxProvideVersion = 0;
if (Version.empty() == false) {
- idxProvideVersion = StoreString(VERSIONNUMBER, Version);
+ idxProvideVersion = StoreString(pkgCacheGenerator::VERSIONNUMBER, Version);
if (unlikely(idxProvideVersion == 0))
return false;
}
@@ -1209,7 +1209,7 @@ bool pkgCacheGenerator::ListParser::NewProvidesAllArch(pkgCache::VerIterator &Ve
return true;
}
/*}}}*/
-bool pkgCacheGenerator::ListParser::SameVersion(unsigned short const Hash,/*{{{*/
+bool pkgCacheListParser::SameVersion(unsigned short const Hash, /*{{{*/
pkgCache::VerIterator const &Ver)
{
return Hash == Ver->Hash;
@@ -1835,5 +1835,5 @@ bool pkgCacheGenerator::FinishCache(OpProgress * /*Progress*/)
}
/*}}}*/
-pkgCacheGenerator::ListParser::ListParser() : Owner(NULL), OldDepLast(NULL), FoundFileDeps(false), d(NULL) {}
-pkgCacheGenerator::ListParser::~ListParser() {}
+pkgCacheListParser::pkgCacheListParser() : Owner(NULL), OldDepLast(NULL), FoundFileDeps(false), d(NULL) {}
+pkgCacheListParser::~pkgCacheListParser() {}