diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-12-22 15:46:13 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-12-22 15:46:13 +0100 |
commit | fa89055f13726dcc07f9fe14b5f1e8a7af210d61 (patch) | |
tree | 90223ca45aa1870e77da8c66600e43694f5b2548 /apt-pkg/contrib/fileutl.h | |
parent | 785cb6fc843f4751ff9c57dcdf375ad061e83f36 (diff) |
shuffle compressor-specific code into private subclasses
This isn't implementing any new features, it is "just" moving code
around from FileFd methods which decided on each call how to handle the
request by including all logic for all possible compressor backends in
the method body to a model in which backend-specifics are implemented in
a FileFdPrivate subclass. This avoids a big chunk of #ifdef's and should
make it a tiny bit more obvious which backend uses which code.
The execution of the idea is slightly uglified by the need to preserve
ABI and API which causes liberal befriending.
Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/contrib/fileutl.h')
-rw-r--r-- | apt-pkg/contrib/fileutl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index 5809bf1de..57d3ab841 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -41,6 +41,12 @@ using std::string; class FileFdPrivate; class FileFd { + friend class FileFdPrivate; + friend class GzipFileFdPrivate; + friend class Bz2FileFdPrivate; + friend class LzmaFileFdPrivate; + friend class DirectFileFdPrivate; + friend class PipedFileFdPrivate; protected: int iFd; |