From be9b62f76406cf2546d21f3ca27587ee20e0fc37 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 2 Feb 2011 22:30:45 +0100 Subject: add more dpointer placeholders --- apt-pkg/srcrecords.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'apt-pkg/srcrecords.h') diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h index a49533864..a681d2e31 100644 --- a/apt-pkg/srcrecords.h +++ b/apt-pkg/srcrecords.h @@ -79,6 +79,8 @@ class pkgSrcRecords }; private: + /** \brief dpointer placeholder (for later in case we need it) */ + void *d; // The list of files and the current parser pointer vector Files; -- cgit v1.2.3 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/srcrecords.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/srcrecords.h') 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 From 8f3ba4e8708cb72be19dacc2af4f601ee5fea292 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 19 Sep 2011 13:31:29 +0200 Subject: do not pollute namespace in the headers with using (Closes: #500198) --- apt-pkg/srcrecords.h | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) (limited to 'apt-pkg/srcrecords.h') diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h index 8a78d7711..a55bc74fa 100644 --- a/apt-pkg/srcrecords.h +++ b/apt-pkg/srcrecords.h @@ -15,10 +15,7 @@ #include -#include - -using std::string; -using std::vector; +#include class pkgSourceList; class pkgIndexFile; @@ -29,10 +26,10 @@ class pkgSrcRecords // Describes a single file struct File { - string MD5Hash; + std::string MD5Hash; unsigned long Size; - string Path; - string Type; + std::string Path; + std::string Type; }; // Abstract parser for each source record @@ -49,8 +46,8 @@ class pkgSrcRecords struct BuildDepRec { - string Package; - string Version; + std::string Package; + std::string Version; unsigned int Op; unsigned char Type; }; @@ -61,18 +58,18 @@ class pkgSrcRecords virtual bool Step() = 0; virtual bool Jump(unsigned long const &Off) = 0; virtual unsigned long Offset() = 0; - virtual string AsStr() = 0; + virtual std::string AsStr() = 0; - virtual string Package() const = 0; - virtual string Version() const = 0; - virtual string Maintainer() const = 0; - virtual string Section() const = 0; + virtual std::string Package() const = 0; + virtual std::string Version() const = 0; + virtual std::string Maintainer() const = 0; + virtual std::string Section() const = 0; virtual const char **Binaries() = 0; // Ownership does not transfer - virtual bool BuildDepends(vector &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true) = 0; + virtual bool BuildDepends(std::vector &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true) = 0; static const char *BuildDepType(unsigned char const &Type); - virtual bool Files(vector &F) = 0; + virtual bool Files(std::vector &F) = 0; Parser(const pkgIndexFile *Index) : iIndex(Index) {}; virtual ~Parser() {}; @@ -83,8 +80,8 @@ class pkgSrcRecords void *d; // The list of files and the current parser pointer - vector Files; - vector::iterator Current; + std::vector Files; + std::vector::iterator Current; public: -- cgit v1.2.3 From a4f6bdc8bd91c7282ae9ac60c44844c6f0058a65 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 13 Dec 2011 00:54:37 +0100 Subject: revert 2184.1.2: do not pollute namespace in headers The breakage is just to big for now, so guard the change with #ifndef APT_8_CLEANER_HEADERS and be nice to library users --- apt-pkg/srcrecords.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apt-pkg/srcrecords.h') diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h index a55bc74fa..06f0dce6c 100644 --- a/apt-pkg/srcrecords.h +++ b/apt-pkg/srcrecords.h @@ -17,6 +17,11 @@ #include #include +#ifndef APT_8_CLEANER_HEADERS +using std::string; +using std::vector; +#endif + class pkgSourceList; class pkgIndexFile; class pkgSrcRecords -- cgit v1.2.3