From 7959c5eda83bd6d69876942566cf47d74fc76530 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 31 May 2010 21:00:09 +0200 Subject: [PATCH] rename packageset into cacheset while it is not too late --- apt-pkg/{packageset.cc => cacheset.cc} | 6 +++--- apt-pkg/{packageset.h => cacheset.h} | 18 +++++++++++------- apt-pkg/makefile | 4 ++-- cmdline/apt-cache.cc | 2 +- cmdline/apt-get.cc | 2 +- debian/changelog | 2 +- 6 files changed, 19 insertions(+), 15 deletions(-) rename apt-pkg/{packageset.cc => cacheset.cc} (94%) rename apt-pkg/{packageset.h => cacheset.h} (93%) diff --git a/apt-pkg/packageset.cc b/apt-pkg/cacheset.cc similarity index 94% rename from apt-pkg/packageset.cc rename to apt-pkg/cacheset.cc index f296b7c4..b49b3653 100644 --- a/apt-pkg/packageset.cc +++ b/apt-pkg/cacheset.cc @@ -3,15 +3,15 @@ /* ###################################################################### 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. + a set of cache structures as to the complete set of all structures + in the pkgCache. Currently only Package is supported. ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ #include #include -#include +#include #include #include diff --git a/apt-pkg/packageset.h b/apt-pkg/cacheset.h similarity index 93% rename from apt-pkg/packageset.h rename to apt-pkg/cacheset.h index 9f80d60e..7c05face 100644 --- a/apt-pkg/packageset.h +++ b/apt-pkg/cacheset.h @@ -1,14 +1,13 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -/** \class APT::PackageSet +/** \file cacheset.h + Wrappers around std::set to have set::iterators which behave + similar to the Iterators of the cache structures. - 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. -*/ + Provides also a few helper methods which work with these sets */ /*}}}*/ -#ifndef APT_PACKAGESET_H -#define APT_PACKAGESET_H +#ifndef APT_CACHESET_H +#define APT_CACHESET_H // Include Files /*{{{*/ #include #include @@ -18,6 +17,11 @@ #include /*}}}*/ namespace APT { +/** \class APT::PackageSet + + 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. */ class PackageSet : public std::set { /*{{{*/ public: /*{{{*/ /** \brief smell like a pkgCache::PkgIterator */ diff --git a/apt-pkg/makefile b/apt-pkg/makefile index 968275c5..1a707869 100644 --- a/apt-pkg/makefile +++ b/apt-pkg/makefile @@ -35,7 +35,7 @@ SOURCE+= pkgcache.cc version.cc depcache.cc \ srcrecords.cc cachefile.cc versionmatch.cc policy.cc \ pkgsystem.cc indexfile.cc pkgcachegen.cc acquire-item.cc \ indexrecords.cc vendor.cc vendorlist.cc cdrom.cc indexcopy.cc \ - aptconfiguration.cc packageset.cc + aptconfiguration.cc cacheset.cc HEADERS+= algorithms.h depcache.h pkgcachegen.h cacheiterators.h \ orderlist.h sourcelist.h packagemanager.h tagfile.h \ init.h pkgcache.h version.h progress.h pkgrecords.h \ @@ -43,7 +43,7 @@ HEADERS+= algorithms.h depcache.h pkgcachegen.h cacheiterators.h \ clean.h srcrecords.h cachefile.h versionmatch.h policy.h \ pkgsystem.h indexfile.h metaindex.h indexrecords.h vendor.h \ vendorlist.h cdrom.h indexcopy.h aptconfiguration.h \ - packageset.h + cacheset.h # Source code for the debian specific components # In theory the deb headers do not need to be exported.. diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index d8e14617..891b1087 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 1cffd673..9894747f 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include diff --git a/debian/changelog b/debian/changelog index 054088ec..6b9057ae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,7 +22,7 @@ apt (0.7.26~exp6) UNRELEASED; urgency=low - correct "Dangerous iterator usage." pointed out by cppcheck * ftparchive/writer.h: - add a virtual destructor to FTWScanner class (for cppcheck) - * apt-pkg/packageset.h: + * apt-pkg/cacheset.h: - add a simple wrapper around std::set for packages with it - move regex magic from apt-get to new FromRegEx method - move cmdline parsing from apt-cache to new FromCommandLine method -- 2.20.1