Commit 8abb791d9cd3d5fbed0db576dd8ea6744021d60a

Authored by m-holger
1 parent 5ee0e171

Refactor `Doc` usage: introduce `impl::Doc` namespace and update related `using`…

… declarations across the codebase for improved encapsulation.
libqpdf/QPDF.cc
... ... @@ -27,9 +27,8 @@
27 27 using namespace qpdf;
28 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 32 using Foreign = Objects::Foreign;
34 33 using Streams = Objects::Streams;
35 34  
... ...
libqpdf/QPDFJob.cc
... ... @@ -30,8 +30,7 @@
30 30  
31 31 using namespace qpdf;
32 32  
33   -using QDoc = QPDF::Doc;
34   -using Pages = QDoc::Pages;
  33 +using Pages = impl::Doc::Pages;
35 34  
36 35 namespace
37 36 {
... ...
libqpdf/QPDFWriter.cc
... ... @@ -27,8 +27,7 @@
27 27 using namespace std::literals;
28 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 32 QPDFWriter::ProgressReporter::~ProgressReporter() // NOLINT (modernize-use-equals-default)
34 33 {
... ...
libqpdf/qpdf/QPDF_private.hh
... ... @@ -22,6 +22,11 @@ namespace qpdf
22 22 class OffsetBuffer;
23 23 } // namespace is
24 24  
  25 + namespace impl
  26 + {
  27 + using Doc = QPDF::Doc;
  28 + }
  29 +
25 30 class Doc: public QPDF
26 31 {
27 32 public:
... ...