diff options
author | Jay Berkenbilt <ejb@ql.org> | 2013-01-20 20:55:01 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2013-01-20 21:35:39 +0100 |
commit | 1d88955fa68fb7fb0fd2d705bc80655edb7a5972 (patch) | |
tree | 759fd39c25d449d77294e358efe59d92d9fac879 /include | |
parent | a844c2a3ab9bc0337fa189954efaf515148b5f0a (diff) | |
download | qpdf-1d88955fa68fb7fb0fd2d705bc80655edb7a5972.tar.zst |
Added new QPDFObjectHandle types Keyword and InlineImage
These object types are to facilitate content stream parsing.
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFObjectHandle.hh | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 75912e79..932a6678 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -76,7 +76,8 @@ class QPDFObjectHandle QPDF_DLL bool isInitialized() const; - // Exactly one of these will return true for any object. + // Exactly one of these will return true for any object. Keyword + // and InlineImage are only allowed in content streams. QPDF_DLL bool isBool(); QPDF_DLL @@ -90,6 +91,10 @@ class QPDFObjectHandle QPDF_DLL bool isString(); QPDF_DLL + bool isKeyword(); + QPDF_DLL + bool isInlineImage(); + QPDF_DLL bool isArray(); QPDF_DLL bool isDictionary(); @@ -103,7 +108,8 @@ class QPDFObjectHandle QPDF_DLL bool isIndirect(); - // True for everything except array, dictionary, and stream + // True for everything except array, dictionary, stream, word, and + // inline image. QPDF_DLL bool isScalar(); @@ -148,6 +154,10 @@ class QPDFObjectHandle QPDF_DLL static QPDFObjectHandle newString(std::string const& str); QPDF_DLL + static QPDFObjectHandle newKeyword(std::string const&); + QPDF_DLL + static QPDFObjectHandle newInlineImage(std::string const&); + QPDF_DLL static QPDFObjectHandle newArray(); QPDF_DLL static QPDFObjectHandle newArray( @@ -239,6 +249,12 @@ class QPDFObjectHandle QPDF_DLL std::string getUTF8Value(); + // Methods for content stream objects + QPDF_DLL + std::string getKeywordValue(); + QPDF_DLL + std::string getInlineImageValue(); + // Methods for array objects; see also name and array objects QPDF_DLL int getArrayNItems(); @@ -510,6 +526,10 @@ class QPDFObjectHandle QPDF_DLL void assertString(); QPDF_DLL + void assertKeyword(); + QPDF_DLL + void assertInlineImage(); + QPDF_DLL void assertArray(); QPDF_DLL void assertDictionary(); |