From de0b11fc4793213dc6156d34412580a6e4df0c48 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 29 Jan 2021 10:02:05 -0500 Subject: Add C++ iterator API around array and dictionary objects --- ChangeLog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 4b284beb..90177d36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,19 @@ 2021-01-29 Jay Berkenbilt + * Add wrappers QPDFDictItems and QPDFArrayItems around + QPDFObjectHandle that provide a C++ iterator API, including C++11 + range-for iteration, over arrays and dictionaries. With this, you + can do + + for (auto i: QPDFDictItems(oh)) + { + // i.first is a string, i.second is a QPDFObjectHandle + } + for (auto i: QPDFArrayItems(oh)) + { + // i is a QPDFObjectHandle + } + * QPDFObjectHandle::is* methods to check type now return false on uninitialized objects rather than crashing or throwing a logic error. -- cgit v1.2.3-70-g09d2