Browse Source

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

debian/1.8.y
Michael Vogt 12 years ago
parent
commit
ff72bd0dc7
  1. 15
      apt-pkg/deb/debindexfile.h
  2. 3
      apt-pkg/deb/deblistparser.h
  3. 4
      apt-pkg/deb/debmetaindex.h
  4. 4
      apt-pkg/deb/debrecords.h
  5. 5
      apt-pkg/deb/debsrcrecords.h
  6. 2
      apt-pkg/srcrecords.h

15
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

3
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

4
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<string, vector<debSectionEntry const*> > 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;

4
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

5
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

2
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

Loading…
Cancel
Save