aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-09-06 16:15:00 +0200
committerJay Berkenbilt <ejb@ql.org>2022-09-06 18:45:06 +0200
commit706e37a42c4ab2bae47ead5045a582aed7607f4e (patch)
treef576f41e3fbd554c547d56e37d4130d28cb0f0ea
parent259eec3a94dbb688f9106f543c471bb648d86baa (diff)
downloadqpdf-706e37a42c4ab2bae47ead5045a582aed7607f4e.tar.zst
Move multiple direct owner notes in TODO
-rw-r--r--TODO52
1 files changed, 27 insertions, 25 deletions
diff --git a/TODO b/TODO
index 49d8be62..8bb9fcbe 100644
--- a/TODO
+++ b/TODO
@@ -26,31 +26,6 @@ Pending changes:
Soon: Break ground on "Document-level work"
-Fix Multiple Direct Object Owner Issue
-======================================
-
-These are some ideas I've had, but I'm parking them until I fully
-understand m-holger's proposal to split QPDFObject into QPDFObject and
-QPDFValue.
-
-* Add std::weak_ptr<QPDFObject> parent to QPDFObject. When adding a
- direct object to an array or dictionary, set its parent. When
- removing it, clear the parent pointer.
-* When a direct object that already has a parent is added to
- something, it is a warning and will become an error in qpdf 12.
- There needs to be unsafe add methods used by unsafeShallowCopy.
- These will add but not modify the parent pointer.
-
-This allows an object to be moved from one object to another by
-removing it, which returns the now orphaned object, and then inserting
-it somewhere else. It also doesn't break the pattern of adding a
-direct object to something and subsequently mutating it. It just
-prevents the same object from being added to more than one thing.
-
-Note that arrays and dictionaries still need to contain
-QPDFObjectHandle because of indirect objects. This only pertains to
-direct objects, which are always "resolved" in QPDFObjectHandle.
-
Possible future JSON enhancements
=================================
@@ -815,3 +790,30 @@ Rejected Ideas
circular references. It seems to be too much trouble in the library
and too much toil for library users to be worth the small benefit of
not having to call resetObjGen in QPDF's destructor.
+
+* Fix Multiple Direct Object Owner Issue
+
+ These are some ideas I had before m-holger's changes to split
+ QPDFValue from QPDFObject. These notes were written prior to the
+ split of QPDFObject into QPDFValueProxy and QPDFValue and don't work
+ directly with the new implementation. I think they are still basic
+ valid after adjusting to the new structure, but I think they would
+ come at too high a performance cost to be worth doing.
+
+ * Add std::weak_ptr<QPDFObject> parent to QPDFObject. When adding a
+ direct object to an array or dictionary, set its parent. When
+ removing it, clear the parent pointer.
+ * When a direct object that already has a parent is added to
+ something, it is a warning and will become an error in qpdf 12.
+ There needs to be unsafe add methods used by unsafeShallowCopy.
+ These will add but not modify the parent pointer.
+
+ This allows an object to be moved from one object to another by
+ removing it, which returns the now orphaned object, and then inserting
+ it somewhere else. It also doesn't break the pattern of adding a
+ direct object to something and subsequently mutating it. It just
+ prevents the same object from being added to more than one thing.
+
+ Note that arrays and dictionaries still need to contain
+ QPDFObjectHandle because of indirect objects. This only pertains to
+ direct objects, which are always "resolved" in QPDFObjectHandle.