Browse Source

add c++11 override marker to overridden methods

C++11 adds the 'override' specifier to mark that a method is overriding
a base class method and error out if not. We hide it in the APT_OVERRIDE
macro to ensure that we keep compiling in pre-c++11 standards.

Reported-By: clang-modernize -add-override -override-macros
Git-Dch: Ignore
tags/debian/1.1.exp9
David Kalnischkies 6 years ago
parent
commit
3b3028467c
54 changed files with 368 additions and 362 deletions
  1. +3
    -3
      apt-inst/deb/debfile.h
  2. +3
    -3
      apt-inst/extract.h
  3. +2
    -2
      apt-pkg/acquire-item.cc
  4. +70
    -70
      apt-pkg/acquire-item.h
  5. +4
    -4
      apt-pkg/algorithms.h
  6. +23
    -23
      apt-pkg/cachefilter.h
  7. +1
    -1
      apt-pkg/contrib/md5.h
  8. +3
    -2
      apt-pkg/contrib/progress.h
  9. +1
    -1
      apt-pkg/contrib/sha1.h
  10. +2
    -2
      apt-pkg/contrib/sha2.h
  11. +5
    -5
      apt-pkg/deb/debindexfile.cc
  12. +28
    -28
      apt-pkg/deb/debindexfile.h
  13. +17
    -17
      apt-pkg/deb/deblistparser.h
  14. +3
    -3
      apt-pkg/deb/debmetaindex.cc
  15. +17
    -17
      apt-pkg/deb/debmetaindex.h
  16. +16
    -16
      apt-pkg/deb/debrecords.h
  17. +12
    -12
      apt-pkg/deb/debsrcrecords.h
  18. +8
    -8
      apt-pkg/deb/debsystem.h
  19. +2
    -2
      apt-pkg/deb/debversion.h
  20. +6
    -6
      apt-pkg/deb/dpkgpm.h
  21. +1
    -1
      apt-pkg/depcache.h
  22. +1
    -1
      apt-pkg/edsp/edspindexfile.cc
  23. +1
    -1
      apt-pkg/edsp/edspindexfile.h
  24. +4
    -4
      apt-pkg/edsp/edsplistparser.h
  25. +10
    -8
      apt-pkg/edsp/edspsystem.h
  26. +8
    -8
      apt-pkg/indexcopy.h
  27. +4
    -4
      apt-pkg/indexfile.h
  28. +14
    -14
      apt-pkg/install-progress.h
  29. +3
    -3
      apt-pkg/policy.h
  30. +1
    -1
      apt-pkg/tagfile.h
  31. +9
    -9
      apt-private/acqprogress.h
  32. +8
    -8
      apt-private/private-cacheset.h
  33. +2
    -0
      apt-private/private-moo.h
  34. +4
    -4
      cmdline/apt-cdrom.cc
  35. +2
    -2
      cmdline/apt-extracttemplates.h
  36. +1
    -1
      cmdline/apt-get.cc
  37. +1
    -1
      ftparchive/contents.h
  38. +4
    -4
      ftparchive/writer.h
  39. +2
    -2
      methods/cdrom.cc
  40. +1
    -1
      methods/copy.cc
  41. +1
    -1
      methods/file.cc
  42. +0
    -1
      methods/ftp.cc
  43. +4
    -2
      methods/ftp.h
  44. +2
    -2
      methods/gpgv.cc
  45. +2
    -2
      methods/gzip.cc
  46. +17
    -17
      methods/http.h
  47. +17
    -17
      methods/https.h
  48. +5
    -5
      methods/mirror.h
  49. +2
    -2
      methods/rred.cc
  50. +2
    -2
      methods/rsh.h
  51. +2
    -2
      methods/server.h
  52. +1
    -1
      test/interactive-helper/testdeb.cc
  53. +2
    -2
      test/libapt/acqprogress_test.cc
  54. +4
    -4
      test/libapt/indexcopytosourcelist_test.cc

+ 3
- 3
apt-inst/deb/debfile.h View File

@@ -65,7 +65,7 @@ class debDebFile::ControlExtract : public pkgDirStream
{
public:
virtual bool DoItem(Item &Itm,int &Fd);
virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE;
};

class debDebFile::MemControlExtract : public pkgDirStream
@@ -80,10 +80,10 @@ class debDebFile::MemControlExtract : public pkgDirStream
std::string Member;
// Members from DirStream
virtual bool DoItem(Item &Itm,int &Fd);
virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE;
virtual bool Process(Item &Itm,const unsigned char *Data,
#if APT_PKG_ABI >= 413
unsigned long long Size,unsigned long long Pos);
unsigned long long Size,unsigned long long Pos) APT_OVERRIDE;
#else
unsigned long Size,unsigned long Pos);
#endif


+ 3
- 3
apt-inst/extract.h View File

@@ -38,9 +38,9 @@ class pkgExtract : public pkgDirStream
public:
virtual bool DoItem(Item &Itm,int &Fd);
virtual bool Fail(Item &Itm,int Fd);
virtual bool FinishedFile(Item &Itm,int Fd);
virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE;
virtual bool Fail(Item &Itm,int Fd) APT_OVERRIDE;
virtual bool FinishedFile(Item &Itm,int Fd) APT_OVERRIDE;

bool Finished();
bool Aborted();


+ 2
- 2
apt-pkg/acquire-item.cc View File

@@ -391,8 +391,8 @@ class APT_HIDDEN NoActionItem : public pkgAcquire::Item /*{{{*/
{
IndexTarget const Target;
public:
virtual std::string DescURI() const {return Target.URI;};
virtual HashStringList GetExpectedHashes() const {return HashStringList();};
virtual std::string DescURI() const APT_OVERRIDE {return Target.URI;};
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE {return HashStringList();};

NoActionItem(pkgAcquire * const Owner, IndexTarget const &Target) :
pkgAcquire::Item(Owner), Target(Target)


+ 70
- 70
apt-pkg/acquire-item.h View File

@@ -349,7 +349,7 @@ class APT_HIDDEN pkgAcqTransactionItem: public pkgAcquire::Item /*{{{*/
IndexTarget const Target;
HashStringList GetExpectedHashesFor(std::string const &MetaKey) const;

bool QueueURI(pkgAcquire::ItemDesc &Item);
bool QueueURI(pkgAcquire::ItemDesc &Item) APT_OVERRIDE;

public:
/** \brief storge name until a transaction is finished */
@@ -364,10 +364,10 @@ class APT_HIDDEN pkgAcqTransactionItem: public pkgAcquire::Item /*{{{*/
};
virtual bool TransactionState(TransactionStates const state);

virtual std::string DescURI() const { return Target.URI; }
virtual HashStringList GetExpectedHashes() const;
virtual std::string DescURI() const APT_OVERRIDE { return Target.URI; }
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
virtual std::string GetMetaKey() const;
virtual bool HashesRequired() const;
virtual bool HashesRequired() const APT_OVERRIDE;


pkgAcqTransactionItem(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager, IndexTarget const &Target);
@@ -417,7 +417,7 @@ class APT_HIDDEN pkgAcqMetaBase : public pkgAcqTransactionItem /*{{{*/
/** \brief Queue the downloaded Signature for verification */
void QueueForSignatureVerify(pkgAcqTransactionItem * const I, std::string const &File, std::string const &Signature);

virtual std::string Custom600Headers() const;
virtual std::string Custom600Headers() const APT_OVERRIDE;

/** \brief Called when authentication succeeded.
*
@@ -440,15 +440,15 @@ class APT_HIDDEN pkgAcqMetaBase : public pkgAcqTransactionItem /*{{{*/
*/
bool VerifyVendor(std::string const &Message);

virtual bool TransactionState(TransactionStates const state);
virtual bool TransactionState(TransactionStates const state) APT_OVERRIDE;

public:
// This refers more to the Transaction-Manager than the actual file
bool IMSHit;

virtual bool QueueURI(pkgAcquire::ItemDesc &Item);
virtual HashStringList GetExpectedHashes() const;
virtual bool HashesRequired() const;
virtual bool QueueURI(pkgAcquire::ItemDesc &Item) APT_OVERRIDE;
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
virtual bool HashesRequired() const APT_OVERRIDE;

// transaction code
void Add(pkgAcqTransactionItem * const I);
@@ -466,7 +466,7 @@ class APT_HIDDEN pkgAcqMetaBase : public pkgAcqTransactionItem /*{{{*/
void TransactionStageRemoval(pkgAcqTransactionItem * const I, const std::string &FinalFile);

/** \brief Get the full pathname of the final file for the current URI */
virtual std::string GetFinalFilename() const;
virtual std::string GetFinalFilename() const APT_OVERRIDE;

pkgAcqMetaBase(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
std::vector<IndexTarget> const &IndexTargets,
@@ -494,13 +494,13 @@ class APT_HIDDEN pkgAcqMetaIndex : public pkgAcqMetaBase
void Init(std::string const &URIDesc, std::string const &ShortDesc);

public:
virtual std::string DescURI() const;
virtual std::string DescURI() const APT_OVERRIDE;

// Specialized action members
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual void Finished();
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Finished() APT_OVERRIDE;

/** \brief Create a new pkgAcqMetaIndex. */
pkgAcqMetaIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
@@ -531,16 +531,16 @@ class APT_HIDDEN pkgAcqMetaSig : public pkgAcqTransactionItem
protected:

/** \brief Get the full pathname of the final file for the current URI */
virtual std::string GetFinalFilename() const;
virtual std::string GetFinalFilename() const APT_OVERRIDE;

public:
virtual bool HashesRequired() const { return false; }
virtual bool HashesRequired() const APT_OVERRIDE { return false; }

// Specialized action members
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string Custom600Headers() const APT_OVERRIDE;

/** \brief Create a new pkgAcqMetaSig. */
pkgAcqMetaSig(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
@@ -561,10 +561,10 @@ class APT_HIDDEN pkgAcqMetaClearSig : public pkgAcqMetaIndex
metaIndex *MetaIndexParser;
metaIndex *LastMetaIndexParser;

virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string Custom600Headers() const APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;

/** \brief Create a new pkgAcqMetaClearSig. */
pkgAcqMetaClearSig(pkgAcquire * const Owner,
@@ -583,7 +583,7 @@ class APT_HIDDEN pkgAcqBaseIndex : public pkgAcqTransactionItem

public:
/** \brief Get the full pathname of the final file for the current URI */
virtual std::string GetFinalFilename() const;
virtual std::string GetFinalFilename() const APT_OVERRIDE;

pkgAcqBaseIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
IndexTarget const &Target);
@@ -614,19 +614,19 @@ class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqBaseIndex
std::string Description;

/** \brief Get the full pathname of the final file for the current URI */
virtual std::string GetFinalFilename() const;
virtual std::string GetFinalFilename() const APT_OVERRIDE;

virtual bool QueueURI(pkgAcquire::ItemDesc &Item);
virtual bool QueueURI(pkgAcquire::ItemDesc &Item) APT_OVERRIDE;

virtual bool TransactionState(TransactionStates const state);
virtual bool TransactionState(TransactionStates const state) APT_OVERRIDE;
public:
// Specialized action members
virtual void Failed(std::string const &Message, pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message, pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string DescURI() const {return Target.URI + "Index";};
virtual std::string Custom600Headers() const;
virtual std::string GetMetaKey() const;
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string DescURI() const APT_OVERRIDE {return Target.URI + "Index";};
virtual std::string Custom600Headers() const APT_OVERRIDE;
virtual std::string GetMetaKey() const APT_OVERRIDE;

/** \brief Parse the Index file for a set of Packages diffs.
*
@@ -724,13 +724,13 @@ class APT_HIDDEN pkgAcqIndexMergeDiffs : public pkgAcqBaseIndex
* This method will fall back to downloading the whole index file
* outright; its arguments are ignored.
*/
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
virtual std::string DescURI() const {return Target.URI + "Index";};
virtual HashStringList GetExpectedHashes() const;
virtual bool HashesRequired() const;
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string Custom600Headers() const APT_OVERRIDE;
virtual std::string DescURI() const APT_OVERRIDE {return Target.URI + "Index";};
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
virtual bool HashesRequired() const APT_OVERRIDE;

/** \brief Create an index merge-diff item.
*
@@ -836,14 +836,14 @@ class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex
* This method will fall back to downloading the whole index file
* outright; its arguments are ignored.
*/
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;

virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
virtual std::string DescURI() const {return Target.URI + "IndexDiffs";};
virtual HashStringList GetExpectedHashes() const;
virtual bool HashesRequired() const;
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string Custom600Headers() const APT_OVERRIDE;
virtual std::string DescURI() const APT_OVERRIDE {return Target.URI + "IndexDiffs";};
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
virtual bool HashesRequired() const APT_OVERRIDE;

/** \brief Create an index diff item.
*
@@ -928,18 +928,18 @@ class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex
void ReverifyAfterIMS();

/** \brief Get the full pathname of the final file for the current URI */
virtual std::string GetFinalFilename() const;
virtual std::string GetFinalFilename() const APT_OVERRIDE;

virtual bool TransactionState(TransactionStates const state);
virtual bool TransactionState(TransactionStates const state) APT_OVERRIDE;

public:
// Specialized action members
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string Custom600Headers() const;
virtual std::string DescURI() const {return Desc.URI;};
virtual std::string GetMetaKey() const;
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string Custom600Headers() const APT_OVERRIDE;
virtual std::string DescURI() const APT_OVERRIDE {return Desc.URI;};
virtual std::string GetMetaKey() const APT_OVERRIDE;

pkgAcqIndex(pkgAcquire * const Owner, pkgAcqMetaClearSig * const TransactionManager,
IndexTarget const &Target);
@@ -1000,19 +1000,19 @@ class pkgAcqArchive : public pkgAcquire::Item
bool QueueNext();

/** \brief Get the full pathname of the final file for the current URI */
virtual std::string GetFinalFilename() const;
virtual std::string GetFinalFilename() const APT_OVERRIDE;

public:

virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &Hashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string DescURI() const;
virtual std::string ShortDesc() const;
virtual void Finished();
virtual bool IsTrusted() const;
virtual HashStringList GetExpectedHashes() const;
virtual bool HashesRequired() const;
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string DescURI() const APT_OVERRIDE;
virtual std::string ShortDesc() const APT_OVERRIDE;
virtual void Finished() APT_OVERRIDE;
virtual bool IsTrusted() const APT_OVERRIDE;
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
virtual bool HashesRequired() const APT_OVERRIDE;

/** \brief Create a new pkgAcqArchive.
*
@@ -1053,14 +1053,14 @@ class pkgAcqChangelog : public pkgAcquire::Item
public:
// we will never have hashes for changelogs.
// If you need verified ones, download the deb and extract the changelog.
virtual HashStringList GetExpectedHashes() const { return HashStringList(); }
virtual bool HashesRequired() const { return false; }
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE { return HashStringList(); }
virtual bool HashesRequired() const APT_OVERRIDE { return false; }

// Specialized action members
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &CalcHashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string DescURI() const {return Desc.URI;};
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string DescURI() const APT_OVERRIDE {return Desc.URI;};

/** returns the URI to the changelog of this version
*
@@ -1172,15 +1172,15 @@ class pkgAcqFile : public pkgAcquire::Item

HashStringList const ExpectedHashes;
public:
virtual HashStringList GetExpectedHashes() const;
virtual bool HashesRequired() const;
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE;
virtual bool HashesRequired() const APT_OVERRIDE;

// Specialized action members
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual void Done(std::string const &Message, HashStringList const &CalcHashes,
pkgAcquire::MethodConfig const * const Cnf);
virtual std::string DescURI() const {return Desc.URI;};
virtual std::string Custom600Headers() const;
pkgAcquire::MethodConfig const * const Cnf) APT_OVERRIDE;
virtual std::string DescURI() const APT_OVERRIDE {return Desc.URI;};
virtual std::string Custom600Headers() const APT_OVERRIDE;

/** \brief Create a new pkgAcqFile object.
*


+ 4
- 4
apt-pkg/algorithms.h View File

@@ -62,7 +62,7 @@ class pkgSimulate : public pkgPackageManager /*{{{*/
pkgDepCache *Cache;
public:
virtual VerIterator GetCandidateVer(PkgIterator const &Pkg)
virtual VerIterator GetCandidateVer(PkgIterator const &Pkg) APT_OVERRIDE
{
return (*Cache)[Pkg].CandidateVerIter(*Cache);
}
@@ -77,9 +77,9 @@ class pkgSimulate : public pkgPackageManager /*{{{*/
pkgDepCache::ActionGroup group;
// The Actuall installation implementation
virtual bool Install(PkgIterator Pkg,std::string File);
virtual bool Configure(PkgIterator Pkg);
virtual bool Remove(PkgIterator Pkg,bool Purge);
virtual bool Install(PkgIterator Pkg,std::string File) APT_OVERRIDE;
virtual bool Configure(PkgIterator Pkg) APT_OVERRIDE;
virtual bool Remove(PkgIterator Pkg,bool Purge) APT_OVERRIDE;

private:
APT_HIDDEN void ShortBreaks();


+ 23
- 23
apt-pkg/cachefilter.h View File

@@ -30,33 +30,33 @@ public:
class PackageMatcher : public Matcher {
public:
virtual bool operator() (pkgCache::PkgIterator const &Pkg) = 0;
virtual bool operator() (pkgCache::VerIterator const &Ver) { return (*this)(Ver.ParentPkg()); }
virtual bool operator() (pkgCache::GrpIterator const &/*Grp*/) { return false; }
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE { return (*this)(Ver.ParentPkg()); }
virtual bool operator() (pkgCache::GrpIterator const &/*Grp*/) APT_OVERRIDE { return false; }
virtual ~PackageMatcher();
};

// Generica like True, False, NOT, AND, OR /*{{{*/
class TrueMatcher : public Matcher {
public:
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::VerIterator const &Ver);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
};

class FalseMatcher : public Matcher {
public:
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::VerIterator const &Ver);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
};

class NOTMatcher : public Matcher {
Matcher * const matcher;
public:
explicit NOTMatcher(Matcher * const matcher);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::VerIterator const &Ver);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
virtual ~NOTMatcher();
};

@@ -71,9 +71,9 @@ public:
ANDMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4);
ANDMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4, Matcher * const matcher5);
ANDMatcher& AND(Matcher * const matcher);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::VerIterator const &Ver);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
virtual ~ANDMatcher();
};
class ORMatcher : public Matcher {
@@ -87,9 +87,9 @@ public:
ORMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4);
ORMatcher(Matcher * const matcher1, Matcher * const matcher2, Matcher * const matcher3, Matcher * const matcher4, Matcher * const matcher5);
ORMatcher& OR(Matcher * const matcher);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::VerIterator const &Ver);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual bool operator() (pkgCache::VerIterator const &Ver) APT_OVERRIDE;
virtual ~ORMatcher();
};
/*}}}*/
@@ -97,8 +97,8 @@ class PackageNameMatchesRegEx : public PackageMatcher { /*{{{*/
regex_t* pattern;
public:
explicit PackageNameMatchesRegEx(std::string const &Pattern);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual ~PackageNameMatchesRegEx();
};
/*}}}*/
@@ -106,8 +106,8 @@ class PackageNameMatchesFnmatch : public PackageMatcher { /*{{{*/
const std::string Pattern;
public:
explicit PackageNameMatchesFnmatch(std::string const &Pattern);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::GrpIterator const &Grp);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual bool operator() (pkgCache::GrpIterator const &Grp) APT_OVERRIDE;
virtual ~PackageNameMatchesFnmatch() {};
};
/*}}}*/
@@ -133,7 +133,7 @@ public:
*/
PackageArchitectureMatchesSpecification(std::string const &pattern, bool const isPattern = true);
bool operator() (char const * const &arch);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual ~PackageArchitectureMatchesSpecification();
};
/*}}}*/
@@ -141,7 +141,7 @@ class PackageIsNewInstall : public PackageMatcher { /*{{{*/
pkgCacheFile * const Cache;
public:
explicit PackageIsNewInstall(pkgCacheFile * const Cache);
virtual bool operator() (pkgCache::PkgIterator const &Pkg);
virtual bool operator() (pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual ~PackageIsNewInstall();
};
/*}}}*/


+ 1
- 1
apt-pkg/contrib/md5.h View File

@@ -48,7 +48,7 @@ class MD5Summation : public SummationImplementation

public:

bool Add(const unsigned char *inbuf, unsigned long long inlen);
bool Add(const unsigned char *inbuf, unsigned long long inlen) APT_OVERRIDE;
using SummationImplementation::Add;

MD5SumValue Result();


+ 3
- 2
apt-pkg/contrib/progress.h View File

@@ -24,6 +24,7 @@

#include <string>
#include <sys/time.h>
#include <apt-pkg/macros.h>

#ifndef APT_8_CLEANER_HEADERS
using std::string;
@@ -74,12 +75,12 @@ class OpTextProgress : public OpProgress
bool NoUpdate;
bool NoDisplay;
unsigned long LastLen;
virtual void Update();
virtual void Update() APT_OVERRIDE;
void Write(const char *S);
public:

virtual void Done();
virtual void Done() APT_OVERRIDE;
OpTextProgress(bool NoUpdate = false) : NoUpdate(NoUpdate),
NoDisplay(false), LastLen(0) {};


+ 1
- 1
apt-pkg/contrib/sha1.h View File

@@ -37,7 +37,7 @@ class SHA1Summation : public SummationImplementation
bool Done;
public:
bool Add(const unsigned char *inbuf, unsigned long long inlen);
bool Add(const unsigned char *inbuf, unsigned long long inlen) APT_OVERRIDE;
using SummationImplementation::Add;

SHA1SumValue Result();


+ 2
- 2
apt-pkg/contrib/sha2.h View File

@@ -45,7 +45,7 @@ class SHA256Summation : public SHA2SummationBase
unsigned char Sum[32];

public:
bool Add(const unsigned char *inbuf, unsigned long long len)
bool Add(const unsigned char *inbuf, unsigned long long len) APT_OVERRIDE
{
if (Done)
return false;
@@ -78,7 +78,7 @@ class SHA512Summation : public SHA2SummationBase
unsigned char Sum[64];

public:
bool Add(const unsigned char *inbuf, unsigned long long len)
bool Add(const unsigned char *inbuf, unsigned long long len) APT_OVERRIDE
{
if (Done)
return false;


+ 5
- 5
apt-pkg/deb/debindexfile.cc View File

@@ -482,7 +482,7 @@ class APT_HIDDEN debIFTypePkg : public pkgIndexFile::Type
{
public:
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const APT_OVERRIDE
{
return new debRecordParser(File.FileName(),*File.Cache());
};
@@ -497,7 +497,7 @@ class APT_HIDDEN debIFTypeStatus : public pkgIndexFile::Type
{
public:
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const APT_OVERRIDE
{
return new debRecordParser(File.FileName(),*File.Cache());
};
@@ -506,7 +506,7 @@ class APT_HIDDEN debIFTypeStatus : public pkgIndexFile::Type
class APT_HIDDEN debIFTypeDebPkgFile : public pkgIndexFile::Type
{
public:
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator File) const APT_OVERRIDE
{
return new debDebFileRecordParser(File.FileName());
};
@@ -515,7 +515,7 @@ class APT_HIDDEN debIFTypeDebPkgFile : public pkgIndexFile::Type
class APT_HIDDEN debIFTypeDscFile : public pkgIndexFile::Type
{
public:
virtual pkgSrcRecords::Parser *CreateSrcPkgParser(std::string DscFile) const
virtual pkgSrcRecords::Parser *CreateSrcPkgParser(std::string DscFile) const APT_OVERRIDE
{
return new debDscRecordParser(DscFile, NULL);
};
@@ -524,7 +524,7 @@ class APT_HIDDEN debIFTypeDscFile : public pkgIndexFile::Type
class APT_HIDDEN debIFTypeDebianSourceDir : public pkgIndexFile::Type
{
public:
virtual pkgSrcRecords::Parser *CreateSrcPkgParser(std::string SourceDir) const
virtual pkgSrcRecords::Parser *CreateSrcPkgParser(std::string SourceDir) const APT_OVERRIDE
{
return new debDscRecordParser(SourceDir + string("/debian/control"), NULL);
};


+ 28
- 28
apt-pkg/deb/debindexfile.h View File

@@ -38,14 +38,14 @@ class APT_HIDDEN debStatusIndex : public pkgIndexFile
virtual const Type *GetType() const APT_CONST;

// Interface for acquire
virtual std::string Describe(bool /*Short*/) const {return File;};
virtual std::string Describe(bool /*Short*/) const APT_OVERRIDE {return File;};

// Interface for the Cache Generator
virtual bool Exists() const;
virtual bool HasPackages() const {return true;};
virtual unsigned long Size() const;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
virtual bool Exists() const APT_OVERRIDE;
virtual bool HasPackages() const APT_OVERRIDE {return true;};
virtual unsigned long Size() const APT_OVERRIDE;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const APT_OVERRIDE;

debStatusIndex(std::string File);
virtual ~debStatusIndex();
@@ -59,12 +59,12 @@ class APT_HIDDEN debPackagesIndex : public pkgIndexTargetFile
virtual const Type *GetType() const APT_CONST;

// Stuff for accessing files on remote items
virtual std::string ArchiveInfo(pkgCache::VerIterator Ver) const;
virtual std::string ArchiveInfo(pkgCache::VerIterator Ver) const APT_OVERRIDE;

// Interface for the Cache Generator
virtual bool HasPackages() const {return true;};
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
virtual bool HasPackages() const APT_OVERRIDE {return true;};
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const APT_OVERRIDE;

debPackagesIndex(IndexTarget const &Target, bool const Trusted);
virtual ~debPackagesIndex();
@@ -78,9 +78,9 @@ class APT_HIDDEN debTranslationsIndex : public pkgIndexTargetFile
virtual const Type *GetType() const APT_CONST;

// Interface for the Cache Generator
virtual bool HasPackages() const;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
virtual bool HasPackages() const APT_OVERRIDE;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const APT_OVERRIDE;

debTranslationsIndex(IndexTarget const &Target);
virtual ~debTranslationsIndex();
@@ -95,13 +95,13 @@ class APT_HIDDEN debSourcesIndex : public pkgIndexTargetFile

// Stuff for accessing files on remote items
virtual std::string SourceInfo(pkgSrcRecords::Parser const &Record,
pkgSrcRecords::File const &File) const;
pkgSrcRecords::File const &File) const APT_OVERRIDE;

// Interface for the record parsers
virtual pkgSrcRecords::Parser *CreateSrcParser() const;
virtual pkgSrcRecords::Parser *CreateSrcParser() const APT_OVERRIDE;

// Interface for the Cache Generator
virtual bool HasPackages() const {return false;};
virtual bool HasPackages() const APT_OVERRIDE {return false;};

debSourcesIndex(IndexTarget const &Target, bool const Trusted);
virtual ~debSourcesIndex();
@@ -117,7 +117,7 @@ class APT_HIDDEN debDebPkgFileIndex : public pkgIndexFile
public:
virtual const Type *GetType() const APT_CONST;

virtual std::string Describe(bool /*Short*/) const {
virtual std::string Describe(bool /*Short*/) const APT_OVERRIDE {
return DebFile;
}

@@ -130,16 +130,16 @@ class APT_HIDDEN debDebPkgFileIndex : public pkgIndexFile
static bool GetContent(std::ostream &content, std::string const &debfile);

// Interface for the Cache Generator
virtual bool Exists() const;
virtual bool HasPackages() const {
virtual bool Exists() const APT_OVERRIDE;
virtual bool HasPackages() const APT_OVERRIDE {
return true;
};
virtual unsigned long Size() const;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
virtual unsigned long Size() const APT_OVERRIDE;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;
virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const APT_OVERRIDE;

// Interface for acquire
virtual std::string ArchiveURI(std::string /*File*/) const;
virtual std::string ArchiveURI(std::string /*File*/) const APT_OVERRIDE;

debDebPkgFileIndex(std::string DebFile);
virtual ~debDebPkgFileIndex();
@@ -152,11 +152,11 @@ class APT_HIDDEN debDscFileIndex : public pkgIndexFile
std::string DscFile;
public:
virtual const Type *GetType() const APT_CONST;
virtual pkgSrcRecords::Parser *CreateSrcParser() const;
virtual bool Exists() const;
virtual bool HasPackages() const {return false;};
virtual unsigned long Size() const;
virtual std::string Describe(bool /*Short*/) const {
virtual pkgSrcRecords::Parser *CreateSrcParser() const APT_OVERRIDE;
virtual bool Exists() const APT_OVERRIDE;
virtual bool HasPackages() const APT_OVERRIDE {return false;};
virtual unsigned long Size() const APT_OVERRIDE;
virtual std::string Describe(bool /*Short*/) const APT_OVERRIDE {
return DscFile;
};



+ 17
- 17
apt-pkg/deb/deblistparser.h View File

@@ -62,24 +62,24 @@ class APT_HIDDEN debListParser : public pkgCacheGenerator::ListParser
APT_PUBLIC static unsigned char GetPrio(std::string Str);
// These all operate against the current section
virtual std::string Package();
virtual std::string Architecture();
virtual bool ArchitectureAll();
virtual std::string Version();
virtual bool NewVersion(pkgCache::VerIterator &Ver);
virtual std::string Description(std::string const &lang);
virtual std::vector<std::string> AvailableDescriptionLanguages();
virtual MD5SumValue Description_md5();
virtual unsigned short VersionHash();
virtual std::string Package() APT_OVERRIDE;
virtual std::string Architecture() APT_OVERRIDE;
virtual bool ArchitectureAll() APT_OVERRIDE;
virtual std::string Version() APT_OVERRIDE;
virtual bool NewVersion(pkgCache::VerIterator &Ver) APT_OVERRIDE;
virtual std::string Description(std::string const &lang) APT_OVERRIDE;
virtual std::vector<std::string> AvailableDescriptionLanguages() APT_OVERRIDE;
virtual MD5SumValue Description_md5() APT_OVERRIDE;
virtual unsigned short VersionHash() APT_OVERRIDE;
#if APT_PKG_ABI >= 413
virtual bool SameVersion(unsigned short const Hash, pkgCache::VerIterator const &Ver);
virtual bool SameVersion(unsigned short const Hash, pkgCache::VerIterator const &Ver) APT_OVERRIDE;
#endif
virtual bool UsePackage(pkgCache::PkgIterator &Pkg,
pkgCache::VerIterator &Ver);
virtual map_filesize_t Offset() {return iOffset;};
virtual map_filesize_t Size() {return Section.size();};
pkgCache::VerIterator &Ver) APT_OVERRIDE;
virtual map_filesize_t Offset() APT_OVERRIDE {return iOffset;};
virtual map_filesize_t Size() APT_OVERRIDE {return Section.size();};

virtual bool Step();
virtual bool Step() APT_OVERRIDE;

bool LoadReleaseInfo(pkgCache::RlsFileIterator &FileI,FileFd &File,
std::string const &section);
@@ -111,15 +111,15 @@ class APT_HIDDEN debDebFileParser : public debListParser
public:
debDebFileParser(FileFd *File, std::string const &DebFile);
virtual bool UsePackage(pkgCache::PkgIterator &Pkg,
pkgCache::VerIterator &Ver);
pkgCache::VerIterator &Ver) APT_OVERRIDE;
};

class APT_HIDDEN debTranslationsParser : public debListParser
{
public:
// a translation can never be a real package
virtual std::string Architecture() { return ""; }
virtual std::string Version() { return ""; }
virtual std::string Architecture() APT_OVERRIDE { return ""; }
virtual std::string Version() APT_OVERRIDE { return ""; }

debTranslationsParser(FileFd *File, std::string const &Arch = "")
: debListParser(File, Arch) {};


+ 3
- 3
apt-pkg/deb/debmetaindex.cc View File

@@ -758,7 +758,7 @@ class APT_HIDDEN debSLTypeDeb : public debSLTypeDebian /*{{{*/

bool CreateItem(std::vector<metaIndex *> &List, std::string const &URI,
std::string const &Dist, std::string const &Section,
std::map<std::string, std::string> const &Options) const
std::map<std::string, std::string> const &Options) const APT_OVERRIDE
{
return CreateItemInternal(List, URI, Dist, Section, false, Options);
}
@@ -774,7 +774,7 @@ class APT_HIDDEN debSLTypeDebSrc : public debSLTypeDebian /*{{{*/

bool CreateItem(std::vector<metaIndex *> &List, std::string const &URI,
std::string const &Dist, std::string const &Section,
std::map<std::string, std::string> const &Options) const
std::map<std::string, std::string> const &Options) const APT_OVERRIDE
{
return CreateItemInternal(List, URI, Dist, Section, true, Options);
}
@@ -800,7 +800,7 @@ class APT_HIDDEN debSLTypeDebFile : public pkgSourceList::Type /*{{{*/

bool CreateItem(std::vector<metaIndex *> &List, std::string const &URI,
std::string const &/*Dist*/, std::string const &/*Section*/,
std::map<std::string, std::string> const &/*Options*/) const
std::map<std::string, std::string> const &/*Options*/) const APT_OVERRIDE
{
metaIndex *mi = new debDebFileMetaIndex(URI);
List.push_back(mi);


+ 17
- 17
apt-pkg/deb/debmetaindex.h View File

@@ -39,18 +39,18 @@ class APT_HIDDEN debReleaseIndex : public metaIndex
debReleaseIndex(std::string const &URI, std::string const &Dist, bool const Trusted);
virtual ~debReleaseIndex();

virtual std::string ArchiveURI(std::string const &File) const {return URI + File;};
virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false);
virtual std::vector<IndexTarget> GetIndexTargets() const;
virtual std::string ArchiveURI(std::string const &File) const APT_OVERRIDE {return URI + File;};
virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) APT_OVERRIDE;
virtual std::vector<IndexTarget> GetIndexTargets() const APT_OVERRIDE;

virtual std::string Describe() const;
virtual pkgCache::RlsFileIterator FindInCache(pkgCache &Cache, bool const ModifyCheck) const;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
virtual std::string Describe() const APT_OVERRIDE;
virtual pkgCache::RlsFileIterator FindInCache(pkgCache &Cache, bool const ModifyCheck) const APT_OVERRIDE;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;

virtual bool Load(std::string const &Filename, std::string * const ErrorText);
virtual metaIndex * UnloadedClone() const;
virtual bool Load(std::string const &Filename, std::string * const ErrorText) APT_OVERRIDE;
virtual metaIndex * UnloadedClone() const APT_OVERRIDE;

virtual std::vector <pkgIndexFile *> *GetIndexFiles();
virtual std::vector <pkgIndexFile *> *GetIndexFiles() APT_OVERRIDE;

bool SetTrusted(TriState const Trusted);
bool SetCheckValidUntil(TriState const Trusted);
@@ -58,7 +58,7 @@ class APT_HIDDEN debReleaseIndex : public metaIndex
bool SetValidUntilMax(time_t const Valid);
bool SetSignedBy(std::string const &SignedBy);

virtual bool IsTrusted() const;
virtual bool IsTrusted() const APT_OVERRIDE;

void AddComponent(bool const isSrc, std::string const &Name,
std::vector<std::string> const &Targets,
@@ -73,29 +73,29 @@ private:
std::string DebFile;
debDebPkgFileIndex *DebIndex;
public:
virtual std::string ArchiveURI(std::string const& /*File*/) const {
virtual std::string ArchiveURI(std::string const& /*File*/) const APT_OVERRIDE {
return DebFile;
}
virtual bool GetIndexes(pkgAcquire* /*Owner*/, const bool& /*GetAll=false*/) {
virtual bool GetIndexes(pkgAcquire* /*Owner*/, const bool& /*GetAll=false*/) APT_OVERRIDE {
return true;
}
virtual std::vector<IndexTarget> GetIndexTargets() const {
virtual std::vector<IndexTarget> GetIndexTargets() const APT_OVERRIDE {
return std::vector<IndexTarget>();
}
virtual std::vector<pkgIndexFile *> *GetIndexFiles() {
virtual std::vector<pkgIndexFile *> *GetIndexFiles() APT_OVERRIDE {
return Indexes;
}
virtual bool IsTrusted() const {
virtual bool IsTrusted() const APT_OVERRIDE {
return true;
}
virtual bool Load(std::string const &, std::string * const ErrorText)
virtual bool Load(std::string const &, std::string * const ErrorText) APT_OVERRIDE
{
LoadedSuccessfully = TRI_NO;
if (ErrorText != NULL)
strprintf(*ErrorText, "Unparseable metaindex as it represents the standalone deb file %s", DebFile.c_str());
return false;
}
virtual metaIndex * UnloadedClone() const
virtual metaIndex * UnloadedClone() const APT_OVERRIDE
{
return NULL;
}


+ 16
- 16
apt-pkg/deb/debrecords.h View File

@@ -33,23 +33,23 @@ class APT_HIDDEN debRecordParserBase : public pkgRecords::Parser

public:
// These refer to the archive file for the Version
virtual std::string FileName();
virtual std::string SourcePkg();
virtual std::string SourceVer();
virtual std::string FileName() APT_OVERRIDE;
virtual std::string SourcePkg() APT_OVERRIDE;
virtual std::string SourceVer() APT_OVERRIDE;

virtual HashStringList Hashes() const;
virtual HashStringList Hashes() const APT_OVERRIDE;

// These are some general stats about the package
virtual std::string Maintainer();
virtual std::string ShortDesc(std::string const &lang);
virtual std::string LongDesc(std::string const &lang);
virtual std::string Name();
virtual std::string Homepage();
virtual std::string Maintainer() APT_OVERRIDE;
virtual std::string ShortDesc(std::string const &lang) APT_OVERRIDE;
virtual std::string LongDesc(std::string const &lang) APT_OVERRIDE;
virtual std::string Name() APT_OVERRIDE;
virtual std::string Homepage() APT_OVERRIDE;

// An arbitrary custom field
virtual std::string RecordField(const char *fieldName);
virtual std::string RecordField(const char *fieldName) APT_OVERRIDE;

virtual void GetRec(const char *&Start,const char *&Stop);
virtual void GetRec(const char *&Start,const char *&Stop) APT_OVERRIDE;

debRecordParserBase();
virtual ~debRecordParserBase();
@@ -62,8 +62,8 @@ class APT_HIDDEN debRecordParser : public debRecordParserBase
FileFd File;
pkgTagFile Tags;

virtual bool Jump(pkgCache::VerFileIterator const &Ver);
virtual bool Jump(pkgCache::DescFileIterator const &Desc);
virtual bool Jump(pkgCache::VerFileIterator const &Ver) APT_OVERRIDE;
virtual bool Jump(pkgCache::DescFileIterator const &Desc) APT_OVERRIDE;

public:
debRecordParser(std::string FileName,pkgCache &Cache);
@@ -80,11 +80,11 @@ class APT_HIDDEN debDebFileRecordParser : public debRecordParserBase
APT_HIDDEN bool LoadContent();
protected:
// single file files, so no jumping whatsoever
bool Jump(pkgCache::VerFileIterator const &);
bool Jump(pkgCache::DescFileIterator const &);
bool Jump(pkgCache::VerFileIterator const &) APT_OVERRIDE;
bool Jump(pkgCache::DescFileIterator const &) APT_OVERRIDE;

public:
virtual std::string FileName();
virtual std::string FileName() APT_OVERRIDE;

debDebFileRecordParser(std::string FileName);
virtual ~debDebFileRecordParser();


+ 12
- 12
apt-pkg/deb/debsrcrecords.h View File

@@ -36,24 +36,24 @@ class APT_HIDDEN debSrcRecordParser : public pkgSrcRecords::Parser
public:

virtual bool Restart() {return Jump(0);};
virtual bool Step() {iOffset = Tags.Offset(); return Tags.Step(Sect);};
virtual bool Jump(unsigned long const &Off) {iOffset = Off; return Tags.Jump(Sect,Off);};
virtual bool Restart() APT_OVERRIDE {return Jump(0);};
virtual bool Step() APT_OVERRIDE {iOffset = Tags.Offset(); return Tags.Step(Sect);};
virtual bool Jump(unsigned long const &Off) APT_OVERRIDE {iOffset = Off; return Tags.Jump(Sect,Off);};

virtual std::string Package() const {return Sect.FindS("Package");};
virtual std::string Version() const {return Sect.FindS("Version");};
virtual std::string Maintainer() const {return Sect.FindS("Maintainer");};
virtual std::string Section() const {return Sect.FindS("Section");};
virtual const char **Binaries();
virtual bool BuildDepends(std::vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true);
virtual unsigned long Offset() {return iOffset;};
virtual std::string AsStr()
virtual std::string Package() const APT_OVERRIDE {return Sect.FindS("Package");};
virtual std::string Version() const APT_OVERRIDE {return Sect.FindS("Version");};
virtual std::string Maintainer() const APT_OVERRIDE {return Sect.FindS("Maintainer");};
virtual std::string Section() const APT_OVERRIDE {return Sect.FindS("Section");};
virtual const char **Binaries() APT_OVERRIDE;
virtual bool BuildDepends(std::vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true) APT_OVERRIDE;
virtual unsigned long Offset() APT_OVERRIDE {return iOffset;};
virtual std::string AsStr() APT_OVERRIDE
{
const char *Start=0,*Stop=0;
Sect.GetSection(Start,Stop);
return std::string(Start,Stop);
};
virtual bool Files(std::vector<pkgSrcRecords::File> &F);
virtual bool Files(std::vector<pkgSrcRecords::File> &F) APT_OVERRIDE;
bool Files2(std::vector<pkgSrcRecords::File2> &F);

debSrcRecordParser(std::string const &File,pkgIndexFile const *Index);


+ 8
- 8
apt-pkg/deb/debsystem.h View File

@@ -33,15 +33,15 @@ class debSystem : public pkgSystem

public:

virtual bool Lock();
virtual bool UnLock(bool NoErrors = false);
virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const;
virtual bool Initialize(Configuration &Cnf);
virtual bool ArchiveSupported(const char *Type);
virtual signed Score(Configuration const &Cnf);
virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List);
virtual bool Lock() APT_OVERRIDE;
virtual bool UnLock(bool NoErrors = false) APT_OVERRIDE;
virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const APT_OVERRIDE;
virtual bool Initialize(Configuration &Cnf) APT_OVERRIDE;
virtual bool ArchiveSupported(const char *Type) APT_OVERRIDE;
virtual signed Score(Configuration const &Cnf) APT_OVERRIDE;
virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) APT_OVERRIDE;
virtual bool FindIndex(pkgCache::PkgFileIterator File,
pkgIndexFile *&Found) const;
pkgIndexFile *&Found) const APT_OVERRIDE;

debSystem();
virtual ~debSystem();


+ 2
- 2
apt-pkg/deb/debversion.h View File

@@ -27,11 +27,11 @@ class debVersioningSystem : public pkgVersioningSystem
const char *B,const char *Bend) APT_PURE;
virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer) APT_PURE;
virtual APT_PURE int DoCmpReleaseVer(const char *A,const char *Aend,
const char *B,const char *Bend)
const char *B,const char *Bend) APT_OVERRIDE
{
return DoCmpVersion(A,Aend,B,Bend);
}
virtual std::string UpstreamVersion(const char *A);
virtual std::string UpstreamVersion(const char *A) APT_OVERRIDE;

debVersioningSystem();
};


+ 6
- 6
apt-pkg/deb/dpkgpm.h View File

@@ -120,14 +120,14 @@ class pkgDPkgPM : public pkgPackageManager
void ProcessDpkgStatusLine(char *line);

// The Actuall installation implementation
virtual bool Install(PkgIterator Pkg,std::string File);
virtual bool Configure(PkgIterator Pkg);
virtual bool Remove(PkgIterator Pkg,bool Purge = false);
virtual bool Install(PkgIterator Pkg,std::string File) APT_OVERRIDE;
virtual bool Configure(PkgIterator Pkg) APT_OVERRIDE;
virtual bool Remove(PkgIterator Pkg,bool Purge = false) APT_OVERRIDE;

virtual bool Go(APT::Progress::PackageManager *progress);
virtual bool Go(int StatusFd=-1);
virtual bool Go(APT::Progress::PackageManager *progress) APT_OVERRIDE;
virtual bool Go(int StatusFd=-1) APT_OVERRIDE;

virtual void Reset();
virtual void Reset() APT_OVERRIDE;
public:



+ 1
- 1
apt-pkg/depcache.h View File

@@ -204,7 +204,7 @@ class pkgDepCache : protected pkgCache::Namespace
DefaultRootSetFunc() : Configuration::MatchAgainstConfig("APT::NeverAutoRemove") {};
virtual ~DefaultRootSetFunc() {};

bool InRootSet(const pkgCache::PkgIterator &pkg) { return pkg.end() == false && Match(pkg.Name()); };
bool InRootSet(const pkgCache::PkgIterator &pkg) APT_OVERRIDE { return pkg.end() == false && Match(pkg.Name()); };
};

struct StateCache


+ 1
- 1
apt-pkg/edsp/edspindexfile.cc View File

@@ -67,7 +67,7 @@ bool edspIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
class APT_HIDDEN edspIFType: public pkgIndexFile::Type
{
public:
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator) const
virtual pkgRecords::Parser *CreatePkgParser(pkgCache::PkgFileIterator) const APT_OVERRIDE
{
// we don't have a record parser for this type as the file is not presistent
return NULL;


+ 1
- 1
apt-pkg/edsp/edspindexfile.h View File

@@ -27,7 +27,7 @@ class APT_HIDDEN edspIndex : public debStatusIndex

virtual const Type *GetType() const APT_CONST;

virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;

edspIndex(std::string File);
virtual ~edspIndex();


+ 4
- 4
apt-pkg/edsp/edsplistparser.h View File

@@ -29,11 +29,11 @@ class APT_HIDDEN edspListParser : public debListParser
{
void * const d;
public:
virtual bool NewVersion(pkgCache::VerIterator &Ver);
virtual bool NewVersion(pkgCache::VerIterator &Ver) APT_OVERRIDE;
virtual std::string Description();
virtual std::string DescriptionLanguage();
virtual MD5SumValue Description_md5();
virtual unsigned short VersionHash();
virtual MD5SumValue Description_md5() APT_OVERRIDE;
virtual unsigned short VersionHash() APT_OVERRIDE;

bool LoadReleaseInfo(pkgCache::RlsFileIterator &FileI,FileFd &File,
std::string const &section);
@@ -42,7 +42,7 @@ class APT_HIDDEN edspListParser : public debListParser
virtual ~edspListParser();

protected:
virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver);
virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver) APT_OVERRIDE;

};



+ 10
- 8
apt-pkg/edsp/edspsystem.h View File

@@ -16,6 +16,8 @@

#include <vector>

#include <apt-pkg/macros.h>

class Configuration;
class pkgDepCache;
class pkgIndexFile;
@@ -31,15 +33,15 @@ class APT_HIDDEN edspSystem : public pkgSystem

public:

virtual bool Lock() APT_CONST;
virtual bool UnLock(bool NoErrors = false) APT_CONST;
virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const APT_CONST;
virtual bool Initialize(Configuration &Cnf);
virtual bool ArchiveSupported(const char *Type) APT_CONST;
virtual signed Score(Configuration const &Cnf);
virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List);
virtual bool Lock() APT_OVERRIDE APT_CONST;
virtual bool UnLock(bool NoErrors = false) APT_OVERRIDE APT_CONST;
virtual pkgPackageManager *CreatePM(pkgDepCache *Cache) const APT_OVERRIDE APT_CONST;
virtual bool Initialize(Configuration &Cnf) APT_OVERRIDE;
virtual bool ArchiveSupported(const char *Type) APT_OVERRIDE APT_CONST;
virtual signed Score(Configuration const &Cnf) APT_OVERRIDE;
virtual bool AddStatusFiles(std::vector<pkgIndexFile *> &List) APT_OVERRIDE;
virtual bool FindIndex(pkgCache::PkgFileIterator File,
pkgIndexFile *&Found) const;
pkgIndexFile *&Found) const APT_OVERRIDE;

edspSystem();
virtual ~edspSystem();


+ 8
- 8
apt-pkg/indexcopy.h View File

@@ -62,10 +62,10 @@ class PackageCopy : public IndexCopy /*{{{*/
void * const d;
protected:

virtual bool GetFile(std::string &Filename,unsigned long long &Size);
virtual bool RewriteEntry(FileFd &Target, std::string const &File);
virtual const char *GetFileName() {return "Packages";};
virtual const char *Type() {return "Package";};
virtual bool GetFile(std::string &Filename,unsigned long long &Size) APT_OVERRIDE;
virtual bool RewriteEntry(FileFd &Target, std::string const &File) APT_OVERRIDE;
virtual const char *GetFileName() APT_OVERRIDE {return "Packages";};
virtual const char *Type() APT_OVERRIDE {return "Package";};

public:
PackageCopy();
@@ -77,10 +77,10 @@ class SourceCopy : public IndexCopy /*{{{*/
void * const d;
protected:
virtual bool GetFile(std::string &Filename,unsigned long long &Size);
virtual bool RewriteEntry(FileFd &Target, std::string const &File);
virtual const char *GetFileName() {return "Sources";};
virtual const char *Type() {return "Source";};
virtual bool GetFile(std::string &Filename,unsigned long long &Size) APT_OVERRIDE;
virtual bool RewriteEntry(FileFd &Target, std::string const &File) APT_OVERRIDE;
virtual const char *GetFileName() APT_OVERRIDE {return "Sources";};
virtual const char *Type() APT_OVERRIDE {return "Source";};

public:
SourceCopy();


+ 4
- 4
apt-pkg/indexfile.h View File

@@ -160,10 +160,10 @@ protected:
std::string IndexFileName() const;

public:
virtual std::string ArchiveURI(std::string File) const;
virtual std::string Describe(bool Short = false) const;
virtual bool Exists() const;
virtual unsigned long Size() const;
virtual std::string ArchiveURI(std::string File) const APT_OVERRIDE;
virtual std::string Describe(bool Short = false) const APT_OVERRIDE;
virtual bool Exists() const APT_OVERRIDE;
virtual unsigned long Size() const APT_OVERRIDE;

pkgIndexTargetFile(IndexTarget const &Target, bool const Trusted);
virtual ~pkgIndexTargetFile();


+ 14
- 14
apt-pkg/install-progress.h View File

@@ -72,21 +72,21 @@ namespace Progress {
explicit PackageManagerProgressFd(int progress_fd);
virtual ~PackageManagerProgressFd();

virtual void StartDpkg();
virtual void Stop();
virtual void StartDpkg() APT_OVERRIDE;
virtual void Stop() APT_OVERRIDE;

virtual bool StatusChanged(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
std::string HumanReadableAction);
std::string HumanReadableAction) APT_OVERRIDE;
virtual void Error(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
std::string ErrorMessage);
std::string ErrorMessage) APT_OVERRIDE;
virtual void ConffilePrompt(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
std::string ConfMessage);
std::string ConfMessage) APT_OVERRIDE;

};

@@ -103,21 +103,21 @@ namespace Progress {
explicit PackageManagerProgressDeb822Fd(int progress_fd);
virtual ~PackageManagerProgressDeb822Fd();

virtual void StartDpkg();
virtual void Stop();
virtual void StartDpkg() APT_OVERRIDE;
virtual void Stop() APT_OVERRIDE;

virtual bool StatusChanged(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
std::string HumanReadableAction);
std::string HumanReadableAction) APT_OVERRIDE;
virtual void Error(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
std::string ErrorMessage);
std::string ErrorMessage) APT_OVERRIDE;
virtual void ConffilePrompt(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
std::string ConfMessage);
std::string ConfMessage) APT_OVERRIDE;
};

class PackageManagerFancy : public PackageManager
@@ -144,12 +144,12 @@ namespace Progress {
public:
PackageManagerFancy();
virtual ~PackageManagerFancy();
virtual void Start(int child_pty=-1);
virtual void Stop();
virtual void Start(int child_pty=-1) APT_OVERRIDE;
virtual void Stop() APT_OVERRIDE;
virtual bool StatusChanged(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
std::string HumanReadableAction);
std::string HumanReadableAction) APT_OVERRIDE;

// return a progress bar of the given size for the given progress
// percent between 0.0 and 1.0 in the form "[####...]"
@@ -163,7 +163,7 @@ namespace Progress {
virtual bool StatusChanged(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
std::string HumanReadableAction);
std::string HumanReadableAction) APT_OVERRIDE;

PackageManagerText();
virtual ~PackageManagerText();


+ 3
- 3
apt-pkg/policy.h View File

@@ -78,10 +78,10 @@ class pkgPolicy : public pkgDepCache::Policy
pkgCache::VerIterator GetMatch(pkgCache::PkgIterator const &Pkg);

// Things for the cache interface.
virtual pkgCache::VerIterator GetCandidateVer(pkgCache::PkgIterator const &Pkg);
virtual signed short GetPriority(pkgCache::PkgIterator const &Pkg);
virtual pkgCache::VerIterator GetCandidateVer(pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual signed short GetPriority(pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual signed short GetPriority(pkgCache::VerIterator const &Pkg);
virtual signed short GetPriority(pkgCache::PkgFileIterator const &File);
virtual signed short GetPriority(pkgCache::PkgFileIterator const &File) APT_OVERRIDE;

bool InitDefaults();


+ 1
- 1
apt-pkg/tagfile.h View File

@@ -147,7 +147,7 @@ class pkgTagSection
for being a bit slower to allow comments and new lines all over the place */
class pkgUserTagSection : public pkgTagSection
{
virtual void TrimRecord(bool BeforeRecord, const char* &End);
virtual void TrimRecord(bool BeforeRecord, const char* &End) APT_OVERRIDE;
};

class pkgTagFilePrivate;


+ 9
- 9
apt-private/acqprogress.h View File

@@ -28,15 +28,15 @@ class APT_PUBLIC AcqTextStatus : public pkgAcquireStatus

public:

virtual bool MediaChange(std::string Media,std::string Drive);
virtual void IMSHit(pkgAcquire::ItemDesc &Itm);
virtual void Fetch(pkgAcquire::ItemDesc &Itm);
virtual void Done(pkgAcquire::ItemDesc &Itm);
virtual void Fail(pkgAcquire::ItemDesc &Itm);
virtual void Start();
virtual void Stop();
bool Pulse(pkgAcquire *Owner);
virtual bool MediaChange(std::string Media,std::string Drive) APT_OVERRIDE;
virtual void IMSHit(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE;
virtual void Fetch(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE;
virtual void Done(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE;
virtual void Fail(pkgAcquire::ItemDesc &Itm) APT_OVERRIDE;
virtual void Start() APT_OVERRIDE;
virtual void Stop() APT_OVERRIDE;
bool Pulse(pkgAcquire *Owner) APT_OVERRIDE;

AcqTextStatus(std::ostream &out, unsigned int &ScreenWidth,unsigned int const Quiet);
};


+ 8
- 8
apt-private/private-cacheset.h View File

@@ -81,13 +81,13 @@ class CacheSetHelperVirtuals: public APT::CacheSetHelper {
public:
APT::PackageSet virtualPkgs;

virtual pkgCache::VerIterator canNotGetVersion(enum CacheSetHelper::VerSelector const select, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) {
virtual pkgCache::VerIterator canNotGetVersion(enum CacheSetHelper::VerSelector const select, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) APT_OVERRIDE {
if (select == NEWEST || select == CANDIDATE || select == ALL)
virtualPkgs.insert(Pkg);
return CacheSetHelper::canNotGetVersion(select, Cache, Pkg);
}

virtual void canNotFindVersion(enum CacheSetHelper::VerSelector const select, APT::VersionContainerInterface * vci, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) {
virtual void canNotFindVersion(enum CacheSetHelper::VerSelector const select, APT::VersionContainerInterface * vci, pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) APT_OVERRIDE {
if (select == NEWEST || select == CANDIDATE || select == ALL)
virtualPkgs.insert(Pkg);
return CacheSetHelper::canNotFindVersion(select, vci, Cache, Pkg);
@@ -113,23 +113,23 @@ public:
explicitlyNamed = true;
}

virtual void showTaskSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern) {
virtual void showTaskSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern) APT_OVERRIDE {
ioprintf(out, _("Note, selecting '%s' for task '%s'\n"),
Pkg.FullName(true).c_str(), pattern.c_str());
explicitlyNamed = false;
}
virtual void showFnmatchSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern) {
virtual void showFnmatchSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern) APT_OVERRIDE {
ioprintf(out, _("Note, selecting '%s' for glob '%s'\n"),
Pkg.FullName(true).c_str(), pattern.c_str());
explicitlyNamed = false;
}
virtual void showRegExSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern) {
virtual void showRegExSelection(pkgCache::PkgIterator const &Pkg, std::string const &pattern) APT_OVERRIDE {
ioprintf(out, _("Note, selecting '%s' for regex '%s'\n"),
Pkg.FullName(true).c_str(), pattern.c_str());
explicitlyNamed = false;
}
virtual void showSelectedVersion(pkgCache::PkgIterator const &/*Pkg*/, pkgCache::VerIterator const Ver,
std::string const &ver, bool const /*verIsRel*/) {
std::string const &ver, bool const /*verIsRel*/) APT_OVERRIDE {
if (ver == Ver.VerStr())
return;
selectedByRelease.push_back(make_pair(Ver, ver));
@@ -191,7 +191,7 @@ public:
return false;
}

virtual pkgCache::VerIterator canNotFindCandidateVer(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) {
virtual pkgCache::VerIterator canNotFindCandidateVer(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) APT_OVERRIDE {
APT::VersionSet const verset = tryVirtualPackage(Cache, Pkg, CacheSetHelper::CANDIDATE);
if (verset.empty() == false)
return *(verset.begin());
@@ -202,7 +202,7 @@ public:
return pkgCache::VerIterator(Cache, 0);
}

virtual pkgCache::VerIterator canNotFindNewestVer(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) {
virtual pkgCache::VerIterator canNotFindNewestVer(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg) APT_OVERRIDE {
if (Pkg->ProvidesList != 0)
{
APT::VersionSet const verset = tryVirtualPackage(Cache, Pkg, CacheSetHelper::NEWEST);


+ 2
- 0
apt-private/private-moo.h View File

@@ -1,6 +1,8 @@
#ifndef APT_PRIVATE_MOO_H
#define APT_PRIVATE_MOO_H

#include <apt-pkg/macros.h>

class CommandLine;

APT_PUBLIC bool DoMoo(CommandLine &CmdL);


+ 4
- 4
cmdline/apt-cdrom.cc View File

@@ -44,12 +44,12 @@ protected:
OpTextProgress Progress;
void Prompt(const char *Text);
string PromptLine(const char *Text);
bool AskCdromName(string &name);
bool AskCdromName(string &name) APT_OVERRIDE;

public:
virtual void Update(string text, int current);
virtual bool ChangeCdrom();
virtual OpProgress* GetOpProgress();
virtual void Update(string text, int current) APT_OVERRIDE;
virtual bool ChangeCdrom() APT_OVERRIDE;
virtual OpProgress* GetOpProgress() APT_OVERRIDE;
};

void pkgCdromTextStatus::Prompt(const char *Text)


+ 2
- 2
cmdline/apt-extracttemplates.h View File

@@ -26,9 +26,9 @@ class DebFile : public pkgDirStream
public:
explicit DebFile(const char *FileName);
~DebFile();
bool DoItem(Item &I, int &fd);
bool DoItem(Item &I, int &fd) APT_OVERRIDE;
bool Process(pkgDirStream::Item &I, const unsigned char *data,
unsigned long long size, unsigned long long pos);
unsigned long long size, unsigned long long pos) APT_OVERRIDE;

bool Go();
bool ParseInfo();


+ 1
- 1
cmdline/apt-get.cc View File

@@ -572,7 +572,7 @@ static bool DoClean(CommandLine &)
class LogCleaner : public pkgArchiveCleaner
{
protected:
virtual void Erase(const char *File,string Pkg,string Ver,struct stat &St)
virtual void Erase(const char *File,string Pkg,string Ver,struct stat &St) APT_OVERRIDE
{
c1out << "Del " << Pkg << " " << Ver << " [" << SizeToStr(St.st_size) << "B]" << endl;


+ 1
- 1
ftparchive/contents.h View File

@@ -81,7 +81,7 @@ class ContentsExtract : public pkgDirStream
bool Read(debDebFile &Deb);
virtual bool DoItem(Item &Itm,int &Fd);
virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE;
void Reset() {CurSize = 0;};
bool TakeContents(const void *Data,unsigned long long Length);
void Add(GenContents &Contents,std::string const &Package);


+ 4
- 4
ftparchive/writer.h View File

@@ -120,7 +120,7 @@ class PackagesWriter : public FTWScanner
inline bool ReadOverride(string const &File) {return Over.ReadOverride(File);};
inline bool ReadExtraOverride(string const &File)
{return Over.ReadExtraOverride(File);};
virtual bool DoPackage(string FileName);
virtual bool DoPackage(string FileName) APT_OVERRIDE;

PackagesWriter(FileFd * const Output, TranslationWriter * const TransWriter, string const &DB,
string const &Overrides,
@@ -142,7 +142,7 @@ class ContentsWriter : public FTWScanner
string Prefix;

bool DoPackage(string FileName,string Package);
virtual bool DoPackage(string FileName)
virtual bool DoPackage(string FileName) APT_OVERRIDE
{return DoPackage(FileName,string());};
bool ReadFromPkgs(string const &PkgFile,string const &PkgCompress);

@@ -171,7 +171,7 @@ class SourcesWriter : public FTWScanner
string DirStrip;
struct CacheDB::Stats &Stats;

virtual bool DoPackage(string FileName);
virtual bool DoPackage(string FileName) APT_OVERRIDE;

SourcesWriter(FileFd * const Output, string const &DB,string const &BOverrides,string const &SOverrides,
string const &ExtOverrides=string());
@@ -182,7 +182,7 @@ class ReleaseWriter : public FTWScanner
{
public:
ReleaseWriter(FileFd * const Output, string const &DB);
virtual bool DoPackage(string FileName);
virtual bool DoPackage(string FileName) APT_OVERRIDE;
void Finish();

// General options


+ 2
- 2
methods/cdrom.cc View File

@@ -42,9 +42,9 @@ class CDROMMethod : public pkgAcqMethod
bool IsCorrectCD(URI want, string MountPath, string& NewID);
bool AutoDetectAndMount(const URI, string &NewID);
virtual bool Fetch(FetchItem *Itm);
virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
string GetID(string Name);
virtual void Exit();
virtual void Exit() APT_OVERRIDE;
public:


+ 1
- 1
methods/copy.cc View File

@@ -27,7 +27,7 @@

class CopyMethod : public pkgAcqMethod
{
virtual bool Fetch(FetchItem *Itm);
virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
void CalculateHashes(FetchItem const * const Itm, FetchResult &Res);
public:


+ 1
- 1
methods/file.cc View File

@@ -30,7 +30,7 @@

class FileMethod : public pkgAcqMethod
{
virtual bool Fetch(FetchItem *Itm);
virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
public:


+ 0
- 1
methods/ftp.cc View File

@@ -39,7 +39,6 @@

// Internet stuff
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>



+ 4
- 2
methods/ftp.h View File

@@ -10,8 +10,10 @@
#ifndef APT_FTP_H
#define APT_FTP_H

#include <apt-pkg/acquire-method.h>
#include <apt-pkg/strutl.h>

#include <sys/socket.h>
#include <sys/types.h>
#include <time.h>
#include <string>
@@ -71,8 +73,8 @@ class FTPConn

class FtpMethod : public pkgAcqMethod
{
virtual bool Fetch(FetchItem *Itm);
virtual bool Configuration(std::string Message);
virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
virtual bool Configuration(std::string Message) APT_OVERRIDE;
FTPConn *Server;


+ 2
- 2
methods/gpgv.cc View File

@@ -46,8 +46,8 @@ class GPGVMethod : public pkgAcqMethod
vector<string> &NoPubKeySigners);
protected:
virtual bool URIAcquire(std::string const &Message, FetchItem *Itm);
virtual bool Configuration(string Message);
virtual bool URIAcquire(std::string const &Message, FetchItem *Itm) APT_OVERRIDE;
virtual bool Configuration(string Message) APT_OVERRIDE;
public:
GPGVMethod() : pkgAcqMethod("1.0",SingleInstance | SendConfig) {};


+ 2
- 2
methods/gzip.cc View File

@@ -32,8 +32,8 @@ const char *Prog;

class GzipMethod : public pkgAcqMethod
{
virtual bool Fetch(FetchItem *Itm);
virtual bool Configuration(std::string Message);
virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
virtual bool Configuration(std::string Message) APT_OVERRIDE;
public:


+ 17
- 17
methods/http.h View File

@@ -99,23 +99,23 @@ struct HttpServerState: public ServerState
int ServerFd;

protected:
virtual bool ReadHeaderLines(std::string &Data);
virtual bool LoadNextResponse(bool const ToFile, FileFd * const File);
virtual bool WriteResponse(std::string const &Data);
virtual bool ReadHeaderLines(std::string &Data) APT_OVERRIDE;
virtual bool LoadNextResponse(bool const ToFile, FileFd * const File) APT_OVERRIDE;
virtual bool WriteResponse(std::string const &Data) APT_OVERRIDE;

public:
virtual void Reset() { ServerState::Reset(); ServerFd = -1; };
virtual void Reset() APT_OVERRIDE { ServerState::Reset(); ServerFd = -1; };

virtual bool RunData(FileFd * const File);
virtual bool RunData(FileFd * const File) APT_OVERRIDE;

virtual bool Open();
virtual bool IsOpen();
virtual bool Close();
virtual bool InitHashes(HashStringList const &ExpectedHashes);
virtual Hashes * GetHashes();
virtual bool Die(FileFd &File);
virtual bool Flush(FileFd * const File);
virtual bool Go(bool ToFile, FileFd * const File);
virtual bool Open() APT_OVERRIDE;
virtual bool IsOpen() APT_OVERRIDE;
virtual bool Close() APT_OVERRIDE;
virtual bool InitHashes(HashStringList const &ExpectedHashes) APT_OVERRIDE;
virtual Hashes * GetHashes() APT_OVERRIDE;
virtual bool Die(FileFd &File) APT_OVERRIDE;
virtual bool Flush(FileFd * const File) APT_OVERRIDE;
virtual bool Go(bool ToFile, FileFd * const File) APT_OVERRIDE;

HttpServerState(URI Srv, HttpMethod *Owner);
virtual ~HttpServerState() {Close();};
@@ -124,12 +124,12 @@ struct HttpServerState: public ServerState
class HttpMethod : public ServerMethod
{
public:
virtual void SendReq(FetchItem *Itm);
virtual void SendReq(FetchItem *Itm) APT_OVERRIDE;

virtual bool Configuration(std::string Message);
virtual bool Configuration(std::string Message) APT_OVERRIDE;

virtual ServerState * CreateServerState(URI uri);
virtual void RotateDNS();
virtual ServerState * CreateServerState(URI uri) APT_OVERRIDE;
virtual void RotateDNS() APT_OVERRIDE;

protected:
std::string AutoDetectProxyCmd;


+ 17
- 17
methods/https.h View File

@@ -32,23 +32,23 @@ class HttpsServerState : public ServerState
Hashes * Hash;

protected:
virtual bool ReadHeaderLines(std::string &/*Data*/) { return false; }
virtual bool LoadNextResponse(bool const /*ToFile*/, FileFd * const /*File*/) { return false; }
virtual bool ReadHeaderLines(std::string &/*Data*/) APT_OVERRIDE { return false; }
virtual bool LoadNextResponse(bool const /*ToFile*/, FileFd * const /*File*/) APT_OVERRIDE { return false; }

public:
virtual bool WriteResponse(std::string const &/*Data*/) { return false; }
virtual bool WriteResponse(std::string const &/*Data*/) APT_OVERRIDE { return false; }

/** \brief Transfer the data from the socket */
virtual bool RunData(FileFd * const /*File*/) { return false; }
virtual bool RunData(FileFd * const /*File*/) APT_OVERRIDE { return false; }

virtual bool Open() { return false; }
virtual bool IsOpen() { return false; }
virtual bool Close() { return false; }
virtual bool InitHashes(HashStringList const &ExpectedHashes);
virtual Hashes * GetHashes();
virtual bool Die(FileFd &/*File*/) { return false; }
virtual bool Flush(FileFd * const /*File*/) { return false; }
virtual bool Go(bool /*ToFile*/, FileFd * const /*File*/) { return false; }
virtual bool Open() APT_OVERRIDE { return false; }
virtual bool IsOpen() APT_OVERRIDE { return false; }
virtual bool Close() APT_OVERRIDE { return false; }
virtual bool InitHashes(HashStringList const &ExpectedHashes) APT_OVERRIDE;
virtual Hashes * GetHashes() APT_OVERRIDE;
virtual bool Die(FileFd &/*File*/) APT_OVERRIDE { return false; }
virtual bool Flush(FileFd * const /*File*/) APT_OVERRIDE { return false; }
virtual bool Go(bool /*ToFile*/, FileFd * const /*File*/) APT_OVERRIDE { return false; }

HttpsServerState(URI Srv, HttpsMethod *Owner);
virtual ~HttpsServerState() {Close();};
@@ -59,7 +59,7 @@ class HttpsMethod : public ServerMethod
// minimum speed in bytes/se that triggers download timeout handling
static const int DL_MIN_SPEED = 10;

virtual bool Fetch(FetchItem *);
virtual bool Fetch(FetchItem *) APT_OVERRIDE;

static size_t parse_header(void *buffer, size_t size, size_t nmemb, void *userp);
static size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp);
@@ -70,14 +70,14 @@ class HttpsMethod : public ServerMethod
ServerState *Server;

// Used by ServerMethods unused by https
virtual void SendReq(FetchItem *) { exit(42); }
virtual void RotateDNS() { exit(42); }
virtual void SendReq(FetchItem *) APT_OVERRIDE { exit(42); }
virtual void RotateDNS() APT_OVERRIDE { exit(42); }

public:
FileFd *File;

virtual bool Configuration(std::string Message);
virtual ServerState * CreateServerState(URI uri);
virtual bool Configuration(std::string Message) APT_OVERRIDE;
virtual ServerState * CreateServerState(URI uri) APT_OVERRIDE;
using pkgAcqMethod::FetchResult;
using pkgAcqMethod::FetchItem;



+ 5
- 5
methods/mirror.h View File

@@ -46,14 +46,14 @@ class MirrorMethod : public HttpMethod
bool Clean(std::string dir);
// we need to overwrite those to transform the url back
virtual void Fail(std::string Why, bool Transient = false);
virtual void URIStart(FetchResult &Res);
virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0);
virtual bool Configuration(std::string Message);
virtual void Fail(std::string Why, bool Transient = false) APT_OVERRIDE;
virtual void URIStart(FetchResult &Res) APT_OVERRIDE;
virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0) APT_OVERRIDE;
virtual bool Configuration(std::string Message) APT_OVERRIDE;

public:
MirrorMethod();
virtual bool Fetch(FetchItem *Itm);
virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
};




+ 2
- 2
methods/rred.cc View File

@@ -558,7 +558,7 @@ class RredMethod : public pkgAcqMethod {
}

protected:
virtual bool URIAcquire(std::string const &Message, FetchItem *Itm) {
virtual bool URIAcquire(std::string const &Message, FetchItem *Itm) APT_OVERRIDE {
Debug = _config->FindB("Debug::pkgAcquire::RRed", false);
URI Get = Itm->Uri;
std::string Path = Get.Host + Get.Path; // rred:/path - no host
@@ -671,7 +671,7 @@ class RredMethod : public pkgAcqMethod {
return true;
}

bool Configuration(std::string Message)
bool Configuration(std::string Message) APT_OVERRIDE
{
if (pkgAcqMethod::Configuration(Message) == false)
return false;


+ 2
- 2
methods/rsh.h View File

@@ -56,8 +56,8 @@ class RSHConn

class RSHMethod : public pkgAcqMethod
{
virtual bool Fetch(FetchItem *Itm);
virtual bool Configuration(std::string Message);
virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
virtual bool Configuration(std::string Message) APT_OVERRIDE;

RSHConn *Server;



+ 2
- 2
methods/server.h View File

@@ -106,7 +106,7 @@ struct ServerState
class ServerMethod : public pkgAcqMethod
{
protected:
virtual bool Fetch(FetchItem *);
virtual bool Fetch(FetchItem *) APT_OVERRIDE;

ServerState *Server;
std::string NextURI;
@@ -146,7 +146,7 @@ class ServerMethod : public pkgAcqMethod
static time_t FailTime;
static APT_NORETURN void SigTerm(int);

virtual bool Configuration(std::string Message);
virtual bool Configuration(std::string Message) APT_OVERRIDE;
virtual bool Flush() { return Server->Flush(File); };

int Loop();


+ 1
- 1
test/interactive-helper/testdeb.cc View File

@@ -13,7 +13,7 @@
class NullStream : public pkgDirStream
{
public:
virtual bool DoItem(Item &/*Itm*/, int &/*Fd*/) {return true;};
virtual bool DoItem(Item &/*Itm*/, int &/*Fd*/) APT_OVERRIDE {return true;};
};

static bool Test(const char *File)


+ 2
- 2
test/libapt/acqprogress_test.cc View File

@@ -13,8 +13,8 @@ class TestItem: public pkgAcquire::Item
public:
TestItem(pkgAcquire * const Acq) : pkgAcquire::Item(Acq) {}

virtual std::string DescURI() const { return ""; }
virtual HashStringList GetExpectedHashes() const { return HashStringList(); }
virtual std::string DescURI() const APT_OVERRIDE { return ""; }
virtual HashStringList GetExpectedHashes() const APT_OVERRIDE { return HashStringList(); }