diff options
author | m-holger <m-holger@kubitscheck.org> | 2022-08-16 14:59:32 +0200 |
---|---|---|
committer | m-holger <m-holger@kubitscheck.org> | 2022-08-30 06:56:23 +0200 |
commit | 6670c685ab9f929121c5498115b278c95574e461 (patch) | |
tree | 7ba128c33014cc33792090604530fcac7b93448c /include | |
parent | 0adfd74f8b5dc96091cd0b4251b08401f54df2ed (diff) | |
download | qpdf-6670c685ab9f929121c5498115b278c95574e461.tar.zst |
Move QPDFObjectHandle::parseInternal to new class QPDFParser
Part of #729
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDF.hh | 3 | ||||
-rw-r--r-- | include/qpdf/QPDFObjectHandle.hh | 21 |
2 files changed, 6 insertions, 18 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index 7c389c1d..12d41eff 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -49,6 +49,7 @@ class QPDF_Stream; class BitStream; class BitWriter; class QPDFLogger; +class QPDFParser; class QPDF { @@ -881,7 +882,7 @@ class QPDF // resolution class ParseGuard { - friend class QPDFObjectHandle; + friend class QPDFParser; private: ParseGuard(QPDF* qpdf) : diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 4b054928..8f38cb24 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -49,9 +49,12 @@ class QPDFTokenizer; class QPDFExc; class Pl_QPDFTokenizer; class QPDFMatrix; +class QPDFParser; class QPDFObjectHandle { + friend class QPDFParser; + public: // This class is used by replaceStreamData. It provides an // alternative way of associating stream data with a stream. See @@ -1563,15 +1566,6 @@ class QPDFObjectHandle QPDFObjectHandle(QPDF*, QPDFObjGen const& og); QPDFObjectHandle(std::shared_ptr<QPDFObject> const&); - enum parser_state_e { - st_top, - st_start, - st_stop, - st_eof, - st_dictionary, - st_array - }; - // Private object factory methods static QPDFObjectHandle newIndirect(QPDF*, QPDFObjGen const& og); static QPDFObjectHandle newStream( @@ -1599,14 +1593,7 @@ class QPDFObjectHandle std::string const&, std::shared_ptr<InputSource>, qpdf_offset_t); - static QPDFObjectHandle parseInternal( - std::shared_ptr<InputSource> input, - std::string const& object_description, - QPDFTokenizer& tokenizer, - bool& empty, - StringDecrypter* decrypter, - QPDF* context, - bool content_stream); + void setParsedOffset(qpdf_offset_t offset); void parseContentStream_internal( std::string const& description, ParserCallbacks* callbacks); |