diff options
author | m-holger <m-holger@kubitscheck.org> | 2022-01-21 15:09:06 +0100 |
---|---|---|
committer | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2022-01-22 15:10:28 +0100 |
commit | 8593b9fdf74e68099a5fe2aa0b6d0b6320781a2d (patch) | |
tree | e280ab8d4af58b16f21a4e3fb05342c04e0e3d29 /include/qpdf/QPDFObjectHandle.hh | |
parent | 370710657a7e7c771668107d1b6407fc350a2891 (diff) | |
download | qpdf-8593b9fdf74e68099a5fe2aa0b6d0b6320781a2d.tar.zst |
Add new convenience methods QPDFObjectHandle::isNameAndEquals, etc
Add methods isNameAndEquals, isDictionaryOfType, isStreamOfType
Diffstat (limited to 'include/qpdf/QPDFObjectHandle.hh')
-rw-r--r-- | include/qpdf/QPDFObjectHandle.hh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index ccc3993e..f540272d 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -365,6 +365,22 @@ class QPDFObjectHandle QPDF_DLL bool isScalar(); + // True if the object is a name object representing the provided name. + QPDF_DLL + bool isNameAndEquals(std::string const& name); + + // True if the object is a dictionary of the specified type and + // subtype, if any. + QPDF_DLL + bool isDictionaryOfType(std::string const& type, + std::string const& subtype = ""); + + // True if the object is a stream of the specified type and + // subtype, if any. + QPDF_DLL + bool isStreamOfType(std::string const& type, + std::string const& subtype = ""); + // Public factory methods // Wrap an object in an array if it is not already an array. This |