diff options
author | Jay Berkenbilt <ejb@ql.org> | 2021-01-29 16:02:05 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2021-01-30 21:15:23 +0100 |
commit | de0b11fc4793213dc6156d34412580a6e4df0c48 (patch) | |
tree | c8b3f45840bd439aeeb5498e0f0fd8107d0e2d05 /ChangeLog | |
parent | 35e7859bc7d903c0177ce2a14f2842e1a2dbb09a (diff) | |
download | qpdf-de0b11fc4793213dc6156d34412580a6e4df0c48.tar.zst |
Add C++ iterator API around array and dictionary objects
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1,5 +1,19 @@ 2021-01-29 Jay Berkenbilt <ejb@ql.org> + * 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. |