From ff72bd0dc7bd4d3bb6979e70d7bca9a07d28af28 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 2 Feb 2011 22:37:01 +0100 Subject: apt-pkg/deb/*: add placeholder dpointer and make destructors virtual --- apt-pkg/deb/debindexfile.h | 15 +++++++++++++++ apt-pkg/deb/deblistparser.h | 3 +++ apt-pkg/deb/debmetaindex.h | 4 +++- apt-pkg/deb/debrecords.h | 4 ++++ apt-pkg/deb/debsrcrecords.h | 5 ++++- apt-pkg/srcrecords.h | 2 +- 6 files changed, 30 insertions(+), 3 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h index b5085992d..0f8d4433f 100644 --- a/apt-pkg/deb/debindexfile.h +++ b/apt-pkg/deb/debindexfile.h @@ -22,6 +22,8 @@ class debStatusIndex : public pkgIndexFile { + /** \brief dpointer placeholder (for later in case we need it) */ + void *d; string File; public: @@ -39,10 +41,14 @@ class debStatusIndex : public pkgIndexFile virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const; debStatusIndex(string File); + virtual ~debStatusIndex() {}; }; class debPackagesIndex : public pkgIndexFile { + /** \brief dpointer placeholder (for later in case we need it) */ + void *d; + string URI; string Dist; string Section; @@ -72,10 +78,14 @@ class debPackagesIndex : public pkgIndexFile debPackagesIndex(string const &URI, string const &Dist, string const &Section, bool const &Trusted, string const &Arch = "native"); + virtual ~debPackagesIndex() {}; }; class debTranslationsIndex : public pkgIndexFile { + /** \brief dpointer placeholder (for later in case we need it) */ + void *d; + string URI; string Dist; string Section; @@ -103,10 +113,14 @@ class debTranslationsIndex : public pkgIndexFile virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const; debTranslationsIndex(string URI,string Dist,string Section, char const * const Language); + virtual ~debTranslationsIndex() {}; }; class debSourcesIndex : public pkgIndexFile { + /** \brief dpointer placeholder (for later in case we need it) */ + void *d; + string URI; string Dist; string Section; @@ -136,6 +150,7 @@ class debSourcesIndex : public pkgIndexFile virtual unsigned long Size() const; debSourcesIndex(string URI,string Dist,string Section,bool Trusted); + virtual ~debSourcesIndex() {}; }; #endif diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 4bc1bd93c..54da938ec 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -27,6 +27,8 @@ class debListParser : public pkgCacheGenerator::ListParser }; private: + /** \brief dpointer placeholder (for later in case we need it) */ + void *d; pkgTagFile Tags; pkgTagSection Section; @@ -73,6 +75,7 @@ class debListParser : public pkgCacheGenerator::ListParser static const char *ConvertRelation(const char *I,unsigned int &Op); debListParser(FileFd *File, string const &Arch = ""); + virtual ~debListParser() {}; }; #endif diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h index 360fa5419..ffcc7c4bb 100644 --- a/apt-pkg/deb/debmetaindex.h +++ b/apt-pkg/deb/debmetaindex.h @@ -19,12 +19,14 @@ class debReleaseIndex : public metaIndex { }; private: + /** \brief dpointer placeholder (for later in case we need it) */ + void *d; std::map > ArchEntries; public: debReleaseIndex(string const &URI, string const &Dist); - ~debReleaseIndex(); + virtual ~debReleaseIndex(); virtual string ArchiveURI(string const &File) const {return URI + File;}; virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const; diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h index 6f358abfa..bbcb5640d 100644 --- a/apt-pkg/deb/debrecords.h +++ b/apt-pkg/deb/debrecords.h @@ -20,6 +20,9 @@ class debRecordParser : public pkgRecords::Parser { + /** \brief dpointer placeholder (for later in case we need it) */ + void *d; + FileFd File; pkgTagFile Tags; pkgTagSection Section; @@ -49,6 +52,7 @@ class debRecordParser : public pkgRecords::Parser virtual void GetRec(const char *&Start,const char *&Stop); debRecordParser(string FileName,pkgCache &Cache); + virtual ~debRecordParser() {}; }; #endif diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h index 905264daa..aa859b0e6 100644 --- a/apt-pkg/deb/debsrcrecords.h +++ b/apt-pkg/deb/debsrcrecords.h @@ -18,6 +18,9 @@ class debSrcRecordParser : public pkgSrcRecords::Parser { + /** \brief dpointer placeholder (for later in case we need it) */ + void *d; + FileFd Fd; pkgTagFile Tags; pkgTagSection Sect; @@ -50,7 +53,7 @@ class debSrcRecordParser : public pkgSrcRecords::Parser debSrcRecordParser(string const &File,pkgIndexFile const *Index) : Parser(Index), Fd(File,FileFd::ReadOnlyGzip), Tags(&Fd,102400), Buffer(0), BufSize(0) {} - ~debSrcRecordParser(); + virtual ~debSrcRecordParser(); }; #endif diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h index a681d2e31..8a78d7711 100644 --- a/apt-pkg/srcrecords.h +++ b/apt-pkg/srcrecords.h @@ -95,7 +95,7 @@ class pkgSrcRecords Parser *Find(const char *Package,bool const &SrcOnly = false); pkgSrcRecords(pkgSourceList &List); - ~pkgSrcRecords(); + virtual ~pkgSrcRecords(); }; #endif -- cgit v1.2.3