Commit 8abb791d9cd3d5fbed0db576dd8ea6744021d60a
1 parent
5ee0e171
Refactor `Doc` usage: introduce `impl::Doc` namespace and update related `using`…
… declarations across the codebase for improved encapsulation.
Showing
4 changed files
with
9 additions
and
7 deletions
libqpdf/QPDF.cc
| @@ -27,9 +27,8 @@ | @@ -27,9 +27,8 @@ | ||
| 27 | using namespace qpdf; | 27 | using namespace qpdf; |
| 28 | using namespace std::literals; | 28 | using namespace std::literals; |
| 29 | 29 | ||
| 30 | -using QDoc = QPDF::Doc; | ||
| 31 | -using Common = QDoc::Common; | ||
| 32 | -using Objects = QDoc::Objects; | 30 | +using Common = impl::Doc::Common; |
| 31 | +using Objects = impl::Doc::Objects; | ||
| 33 | using Foreign = Objects::Foreign; | 32 | using Foreign = Objects::Foreign; |
| 34 | using Streams = Objects::Streams; | 33 | using Streams = Objects::Streams; |
| 35 | 34 |
libqpdf/QPDFJob.cc
libqpdf/QPDFWriter.cc
| @@ -27,8 +27,7 @@ | @@ -27,8 +27,7 @@ | ||
| 27 | using namespace std::literals; | 27 | using namespace std::literals; |
| 28 | using namespace qpdf; | 28 | using namespace qpdf; |
| 29 | 29 | ||
| 30 | -using QDoc = QPDF::Doc; | ||
| 31 | -using Encryption = QDoc::Encryption; | 30 | +using Encryption = impl::Doc::Encryption; |
| 32 | 31 | ||
| 33 | QPDFWriter::ProgressReporter::~ProgressReporter() // NOLINT (modernize-use-equals-default) | 32 | QPDFWriter::ProgressReporter::~ProgressReporter() // NOLINT (modernize-use-equals-default) |
| 34 | { | 33 | { |
libqpdf/qpdf/QPDF_private.hh
| @@ -22,6 +22,11 @@ namespace qpdf | @@ -22,6 +22,11 @@ namespace qpdf | ||
| 22 | class OffsetBuffer; | 22 | class OffsetBuffer; |
| 23 | } // namespace is | 23 | } // namespace is |
| 24 | 24 | ||
| 25 | + namespace impl | ||
| 26 | + { | ||
| 27 | + using Doc = QPDF::Doc; | ||
| 28 | + } | ||
| 29 | + | ||
| 25 | class Doc: public QPDF | 30 | class Doc: public QPDF |
| 26 | { | 31 | { |
| 27 | public: | 32 | public: |