diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-09-19 19:14:19 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-09-19 19:14:19 +0200 |
commit | 472ff00ef2e48383805d281c6364ec27839e3f4d (patch) | |
tree | 6f81e83690167fc78f3bbd3dcf03cf83cdcc60f6 /apt-inst | |
parent | 8f3ba4e8708cb72be19dacc2af4f601ee5fea292 (diff) | |
download | apt-472ff00ef2e48383805d281c6364ec27839e3f4d.tar.gz |
use forward declaration in headers if possible instead of includes
Diffstat (limited to 'apt-inst')
-rw-r--r-- | apt-inst/contrib/arfile.cc | 1 | ||||
-rw-r--r-- | apt-inst/contrib/arfile.h | 3 | ||||
-rw-r--r-- | apt-inst/contrib/extracttar.cc | 1 | ||||
-rw-r--r-- | apt-inst/contrib/extracttar.h | 5 | ||||
-rw-r--r-- | apt-inst/database.cc | 7 | ||||
-rw-r--r-- | apt-inst/database.h | 8 | ||||
-rw-r--r-- | apt-inst/deb/debfile.cc | 1 | ||||
-rw-r--r-- | apt-inst/deb/debfile.h | 5 | ||||
-rw-r--r-- | apt-inst/deb/dpkgdb.cc | 2 | ||||
-rw-r--r-- | apt-inst/deb/dpkgdb.h | 5 | ||||
-rw-r--r-- | apt-inst/extract.cc | 1 | ||||
-rw-r--r-- | apt-inst/filelist.h | 3 |
12 files changed, 35 insertions, 7 deletions
diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc index 4e078349..2dee1a40 100644 --- a/apt-inst/contrib/arfile.cc +++ b/apt-inst/contrib/arfile.cc @@ -18,6 +18,7 @@ #include <apt-pkg/arfile.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/fileutl.h> #include <apt-pkg/error.h> #include <stdlib.h> diff --git a/apt-inst/contrib/arfile.h b/apt-inst/contrib/arfile.h index bfc128ac..2be1323d 100644 --- a/apt-inst/contrib/arfile.h +++ b/apt-inst/contrib/arfile.h @@ -17,7 +17,8 @@ #include <string> -#include <apt-pkg/fileutl.h> + +class FileFd; class ARArchive { diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index 487027c3..12919a7c 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -18,6 +18,7 @@ // Include Files /*{{{*/ #include<config.h> +#include <apt-pkg/dirstream.h> #include <apt-pkg/extracttar.h> #include <apt-pkg/error.h> #include <apt-pkg/strutl.h> diff --git a/apt-inst/contrib/extracttar.h b/apt-inst/contrib/extracttar.h index 27c453d0..8754e8dc 100644 --- a/apt-inst/contrib/extracttar.h +++ b/apt-inst/contrib/extracttar.h @@ -15,9 +15,10 @@ #define PKGLIB_EXTRACTTAR_H #include <apt-pkg/fileutl.h> -#include <apt-pkg/dirstream.h> -#include <algorithm> +#include <string> + +class pkgDirStream; class ExtractTar { diff --git a/apt-inst/database.cc b/apt-inst/database.cc index 1a94e135..da761349 100644 --- a/apt-inst/database.cc +++ b/apt-inst/database.cc @@ -11,6 +11,8 @@ #include<config.h> #include <apt-pkg/database.h> +#include <apt-pkg/filelist.h> +#include <apt-pkg/pkgcachegen.h> /*}}}*/ // DataBase::GetMetaTmp - Get the temp dir /*{{{*/ @@ -26,3 +28,8 @@ bool pkgDataBase::GetMetaTmp(std::string &Dir) return true; } /*}}}*/ +pkgDataBase::~pkgDataBase() +{ + delete Cache; + delete FList; +} diff --git a/apt-inst/database.h b/apt-inst/database.h index cd0e310b..ccfee379 100644 --- a/apt-inst/database.h +++ b/apt-inst/database.h @@ -21,9 +21,13 @@ #ifndef PKGLIB_DATABASE_H #define PKGLIB_DATABASE_H -#include <apt-pkg/filelist.h> #include <apt-pkg/pkgcachegen.h> +#include <string> + +class pkgFLCache; +class OpProgress; + class pkgDataBase { protected: @@ -46,7 +50,7 @@ class pkgDataBase virtual bool LoadChanges() = 0; pkgDataBase() : Cache(0), FList(0) {}; - virtual ~pkgDataBase() {delete Cache; delete FList;}; + virtual ~pkgDataBase(); }; #endif diff --git a/apt-inst/deb/debfile.cc b/apt-inst/deb/debfile.cc index 8ade547f..4bd065cf 100644 --- a/apt-inst/deb/debfile.cc +++ b/apt-inst/deb/debfile.cc @@ -18,6 +18,7 @@ // Include Files /*{{{*/ #include<config.h> +#include <apt-pkg/database.h> #include <apt-pkg/debfile.h> #include <apt-pkg/extracttar.h> #include <apt-pkg/error.h> diff --git a/apt-inst/deb/debfile.h b/apt-inst/deb/debfile.h index e404d81d..2c4734f9 100644 --- a/apt-inst/deb/debfile.h +++ b/apt-inst/deb/debfile.h @@ -25,9 +25,12 @@ #include <apt-pkg/arfile.h> -#include <apt-pkg/database.h> #include <apt-pkg/dirstream.h> #include <apt-pkg/tagfile.h> +#include <apt-pkg/pkgcache.h> + +class FileFd; +class pkgDataBase; class debDebFile { diff --git a/apt-inst/deb/dpkgdb.cc b/apt-inst/deb/dpkgdb.cc index 3112acdb..819c123f 100644 --- a/apt-inst/deb/dpkgdb.cc +++ b/apt-inst/deb/dpkgdb.cc @@ -21,6 +21,8 @@ #include <apt-pkg/progress.h> #include <apt-pkg/tagfile.h> #include <apt-pkg/strutl.h> +#include <apt-pkg/fileutl.h> +#include <apt-pkg/filelist.h> #include <stdio.h> #include <errno.h> diff --git a/apt-inst/deb/dpkgdb.h b/apt-inst/deb/dpkgdb.h index 3656929a..f28563a9 100644 --- a/apt-inst/deb/dpkgdb.h +++ b/apt-inst/deb/dpkgdb.h @@ -22,6 +22,11 @@ #include <apt-pkg/database.h> +#include <string> + +class DynamicMMap; +class OpProgress; + class debDpkgDB : public pkgDataBase { protected: diff --git a/apt-inst/extract.cc b/apt-inst/extract.cc index d48ff63a..29e16302 100644 --- a/apt-inst/extract.cc +++ b/apt-inst/extract.cc @@ -49,6 +49,7 @@ #include <apt-pkg/extract.h> #include <apt-pkg/error.h> #include <apt-pkg/debversion.h> +#include <apt-pkg/fileutl.h> #include <sys/stat.h> #include <stdio.h> diff --git a/apt-inst/filelist.h b/apt-inst/filelist.h index 69c483e7..0405d61d 100644 --- a/apt-inst/filelist.h +++ b/apt-inst/filelist.h @@ -28,9 +28,10 @@ #ifndef PKGLIB_FILELIST_H #define PKGLIB_FILELIST_H +#include <apt-pkg/mmap.h> #include <cstring> -#include <apt-pkg/mmap.h> +#include <string> class pkgFLCache { |