aboutsummaryrefslogtreecommitdiffstats
path: root/include/qpdf/QPDFObjectHandle.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-09-08 17:06:15 +0200
committerJay Berkenbilt <ejb@ql.org>2022-09-08 17:06:15 +0200
commitc7a4967d10fb9688f235baa8e57a1fb578f5387d (patch)
treeb14956a2371befbd30b2a43583c390bc170ccd3d /include/qpdf/QPDFObjectHandle.hh
parentdba61da1bfb7e4d74c723f369d1c017df9707a14 (diff)
downloadqpdf-c7a4967d10fb9688f235baa8e57a1fb578f5387d.tar.zst
Change reset to disconnect and clarify comments
I decided that it's actually fine to copy a direct object to another QPDF. Even if we eventually prevent a QPDFObject from having multiple parents, this could happen if an object is moved.
Diffstat (limited to 'include/qpdf/QPDFObjectHandle.hh')
-rw-r--r--include/qpdf/QPDFObjectHandle.hh13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh
index a4768f97..07fe3ad5 100644
--- a/include/qpdf/QPDFObjectHandle.hh
+++ b/include/qpdf/QPDFObjectHandle.hh
@@ -392,7 +392,8 @@ class QPDFObjectHandle
inline bool isIndirect() const;
// This returns true for indirect objects from a QPDF that has
- // been destroyed.
+ // been destroyed. Trying unparse such an object will throw a
+ // logic_error.
QPDF_DLL
bool isDestroyed();
@@ -1540,8 +1541,8 @@ class QPDFObjectHandle
friend class ObjAccessor;
// Provide access to specific classes for recursive
- // reset().
- class Resetter
+ // disconnected().
+ class DisconnectAccess
{
friend class QPDF_Dictionary;
friend class QPDF_Stream;
@@ -1549,9 +1550,9 @@ class QPDFObjectHandle
private:
static void
- reset(QPDFObjectHandle& o)
+ disconnect(QPDFObjectHandle& o)
{
- o.reset();
+ o.disconnect();
}
};
friend class Resetter;
@@ -1653,7 +1654,7 @@ class QPDFObjectHandle
bool first_level_only,
bool stop_at_streams);
void shallowCopyInternal(QPDFObjectHandle& oh, bool first_level_only);
- void reset();
+ void disconnect();
void setParsedOffset(qpdf_offset_t offset);
void parseContentStream_internal(
std::string const& description, ParserCallbacks* callbacks);