Explorar o código

apt-pkg/deb/*: add placeholder dpointer and make destructors virtual

Michael Vogt %!s(int64=15) %!d(string=hai) anos
pai
achega
ff72bd0dc7

+ 15 - 0
apt-pkg/deb/debindexfile.h

@@ -22,6 +22,8 @@
 
 
 class debStatusIndex : public pkgIndexFile
 class debStatusIndex : public pkgIndexFile
 {
 {
+   /** \brief dpointer placeholder (for later in case we need it) */
+   void *d;
    string File;
    string File;
    
    
    public:
    public:
@@ -39,10 +41,14 @@ class debStatusIndex : public pkgIndexFile
    virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
    virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
 
 
    debStatusIndex(string File);
    debStatusIndex(string File);
+   virtual ~debStatusIndex() {};
 };
 };
     
     
 class debPackagesIndex : public pkgIndexFile
 class debPackagesIndex : public pkgIndexFile
 {
 {
+   /** \brief dpointer placeholder (for later in case we need it) */
+   void *d;
+
    string URI;
    string URI;
    string Dist;
    string Dist;
    string Section;
    string Section;
@@ -72,10 +78,14 @@ class debPackagesIndex : public pkgIndexFile
 
 
    debPackagesIndex(string const &URI, string const &Dist, string const &Section,
    debPackagesIndex(string const &URI, string const &Dist, string const &Section,
 			bool const &Trusted, string const &Arch = "native");
 			bool const &Trusted, string const &Arch = "native");
+   virtual ~debPackagesIndex() {};
 };
 };
 
 
 class debTranslationsIndex : public pkgIndexFile
 class debTranslationsIndex : public pkgIndexFile
 {
 {
+   /** \brief dpointer placeholder (for later in case we need it) */
+   void *d;
+
    string URI;
    string URI;
    string Dist;
    string Dist;
    string Section;
    string Section;
@@ -103,10 +113,14 @@ class debTranslationsIndex : public pkgIndexFile
    virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
    virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
 
 
    debTranslationsIndex(string URI,string Dist,string Section, char const * const Language);
    debTranslationsIndex(string URI,string Dist,string Section, char const * const Language);
+   virtual ~debTranslationsIndex() {};
 };
 };
 
 
 class debSourcesIndex : public pkgIndexFile
 class debSourcesIndex : public pkgIndexFile
 {
 {
+   /** \brief dpointer placeholder (for later in case we need it) */
+   void *d;
+
    string URI;
    string URI;
    string Dist;
    string Dist;
    string Section;
    string Section;
@@ -136,6 +150,7 @@ class debSourcesIndex : public pkgIndexFile
    virtual unsigned long Size() const;
    virtual unsigned long Size() const;
    
    
    debSourcesIndex(string URI,string Dist,string Section,bool Trusted);
    debSourcesIndex(string URI,string Dist,string Section,bool Trusted);
+   virtual ~debSourcesIndex() {};
 };
 };
 
 
 #endif
 #endif

+ 3 - 0
apt-pkg/deb/deblistparser.h

@@ -27,6 +27,8 @@ class debListParser : public pkgCacheGenerator::ListParser
    };
    };
    
    
    private:
    private:
+   /** \brief dpointer placeholder (for later in case we need it) */
+   void *d;
    
    
    pkgTagFile Tags;
    pkgTagFile Tags;
    pkgTagSection Section;
    pkgTagSection Section;
@@ -73,6 +75,7 @@ class debListParser : public pkgCacheGenerator::ListParser
    static const char *ConvertRelation(const char *I,unsigned int &Op);
    static const char *ConvertRelation(const char *I,unsigned int &Op);
 
 
    debListParser(FileFd *File, string const &Arch = "");
    debListParser(FileFd *File, string const &Arch = "");
+   virtual ~debListParser() {};
 };
 };
 
 
 #endif
 #endif

+ 3 - 1
apt-pkg/deb/debmetaindex.h

@@ -19,12 +19,14 @@ class debReleaseIndex : public metaIndex {
    };
    };
 
 
    private:
    private:
+   /** \brief dpointer placeholder (for later in case we need it) */
+   void *d;
    std::map<string, vector<debSectionEntry const*> > ArchEntries;
    std::map<string, vector<debSectionEntry const*> > ArchEntries;
 
 
    public:
    public:
 
 
    debReleaseIndex(string const &URI, string const &Dist);
    debReleaseIndex(string const &URI, string const &Dist);
-   ~debReleaseIndex();
+   virtual ~debReleaseIndex();
 
 
    virtual string ArchiveURI(string const &File) const {return URI + File;};
    virtual string ArchiveURI(string const &File) const {return URI + File;};
    virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const;
    virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const;

+ 4 - 0
apt-pkg/deb/debrecords.h

@@ -20,6 +20,9 @@
 
 
 class debRecordParser : public pkgRecords::Parser
 class debRecordParser : public pkgRecords::Parser
 {
 {
+   /** \brief dpointer placeholder (for later in case we need it) */
+   void *d;
+
    FileFd File;
    FileFd File;
    pkgTagFile Tags;
    pkgTagFile Tags;
    pkgTagSection Section;
    pkgTagSection Section;
@@ -49,6 +52,7 @@ class debRecordParser : public pkgRecords::Parser
    virtual void GetRec(const char *&Start,const char *&Stop);
    virtual void GetRec(const char *&Start,const char *&Stop);
    
    
    debRecordParser(string FileName,pkgCache &Cache);
    debRecordParser(string FileName,pkgCache &Cache);
+   virtual ~debRecordParser() {};
 };
 };
 
 
 #endif
 #endif

+ 4 - 1
apt-pkg/deb/debsrcrecords.h

@@ -18,6 +18,9 @@
 
 
 class debSrcRecordParser : public pkgSrcRecords::Parser
 class debSrcRecordParser : public pkgSrcRecords::Parser
 {
 {
+   /** \brief dpointer placeholder (for later in case we need it) */
+   void *d;
+
    FileFd Fd;
    FileFd Fd;
    pkgTagFile Tags;
    pkgTagFile Tags;
    pkgTagSection Sect;
    pkgTagSection Sect;
@@ -50,7 +53,7 @@ class debSrcRecordParser : public pkgSrcRecords::Parser
    debSrcRecordParser(string const &File,pkgIndexFile const *Index) 
    debSrcRecordParser(string const &File,pkgIndexFile const *Index) 
       : Parser(Index), Fd(File,FileFd::ReadOnlyGzip), Tags(&Fd,102400), 
       : Parser(Index), Fd(File,FileFd::ReadOnlyGzip), Tags(&Fd,102400), 
         Buffer(0), BufSize(0) {}
         Buffer(0), BufSize(0) {}
-   ~debSrcRecordParser();
+   virtual ~debSrcRecordParser();
 };
 };
 
 
 #endif
 #endif

+ 1 - 1
apt-pkg/srcrecords.h

@@ -95,7 +95,7 @@ class pkgSrcRecords
    Parser *Find(const char *Package,bool const &SrcOnly = false);
    Parser *Find(const char *Package,bool const &SrcOnly = false);
    
    
    pkgSrcRecords(pkgSourceList &List);
    pkgSrcRecords(pkgSourceList &List);
-   ~pkgSrcRecords();
+   virtual ~pkgSrcRecords();
 };
 };
 
 
 #endif
 #endif