summaryrefslogtreecommitdiffstats
path: root/include/qpdf/QPDFObject.hh
diff options
context:
space:
mode:
Diffstat (limited to 'include/qpdf/QPDFObject.hh')
-rw-r--r--include/qpdf/QPDFObject.hh22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/qpdf/QPDFObject.hh b/include/qpdf/QPDFObject.hh
index 26b15ef9..b366c33f 100644
--- a/include/qpdf/QPDFObject.hh
+++ b/include/qpdf/QPDFObject.hh
@@ -12,11 +12,33 @@
#include <string>
+class QPDF;
+class QPDFObjectHandle;
+
class QPDFObject
{
public:
virtual ~QPDFObject() {}
virtual std::string unparse() = 0;
+
+ // Accessor to give specific access to non-public methods
+ class ObjAccessor
+ {
+ friend class QPDF;
+ friend class QPDFObjectHandle;
+ private:
+ static void releaseResolved(QPDFObject* o)
+ {
+ if (o)
+ {
+ o->releaseResolved();
+ }
+ }
+ };
+ friend class ObjAccessor;
+
+ protected:
+ virtual void releaseResolved() {}
};
#endif // __QPDFOBJECT_HH__