From d7b470761b3fe6895888f44c15655e880e5afaa0 Mon Sep 17 00:00:00 2001 From: m-holger Date: Thu, 29 Dec 2022 15:12:04 +0000 Subject: Remove QPDFObjectHandle::Factory and ObjAccessor --- include/qpdf/QPDFObjectHandle.hh | 43 ---------------------------------------- 1 file changed, 43 deletions(-) (limited to 'include') diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 51530ee5..3c597adc 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -1490,49 +1490,6 @@ class QPDFObjectHandle QPDF_DLL void warnIfPossible(std::string const& warning); - // Initializers for objects. This Factory class gives the QPDF - // class specific permission to call factory methods without - // making it a friend of the whole QPDFObjectHandle class. - class Factory - { - friend class QPDF; - - private: - static QPDFObjectHandle - newIndirect(std::shared_ptr const& obj) - { - return QPDFObjectHandle(obj); - } - }; - - // Accessor for raw underlying object -- only QPDF is allowed to - // call this. - class ObjAccessor - { - friend class QPDF; - - private: - static std::shared_ptr - getObject(QPDFObjectHandle& o) - { - if (!o.dereference()) { - throw std::logic_error("attempted to dereference an" - " uninitialized QPDFObjectHandle"); - }; - return o.obj; - } - static QPDF_Array* - asArray(QPDFObjectHandle& oh) - { - return oh.asArray(); - } - static QPDF_Stream* - asStream(QPDFObjectHandle& oh) - { - return oh.asStream(); - } - }; - // Provide access to specific classes for recursive // disconnected(). class DisconnectAccess -- cgit v1.2.3-54-g00ecf