1 // Copyright 2016 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef XFA_FXFA_PARSER_CXFA_XML_PARSER_H_ 8 #define XFA_FXFA_PARSER_CXFA_XML_PARSER_H_ 9 10 #include <memory> 11 12 #include "xfa/fde/xml/fde_xml_imp.h" 13 14 class IFGAS_Stream; 15 class IFX_Pause; 16 17 class CXFA_XMLParser : public IFDE_XMLParser { 18 public: 19 CXFA_XMLParser(CFDE_XMLNode* pRoot, 20 const CFX_RetainPtr<IFGAS_Stream>& pStream); 21 ~CXFA_XMLParser() override; 22 23 // IFDE_XMLParser 24 int32_t DoParser(IFX_Pause* pPause) override; 25 26 FX_FILESIZE m_nStart[2]; 27 size_t m_nSize[2]; 28 FX_FILESIZE m_nElementStart; 29 uint16_t m_dwCheckStatus; 30 uint16_t m_dwCurrentCheckStatus; 31 32 protected: 33 CFDE_XMLNode* m_pRoot; 34 CFX_RetainPtr<IFGAS_Stream> m_pStream; 35 std::unique_ptr<CFDE_XMLSyntaxParser> m_pParser; 36 CFDE_XMLNode* m_pParent; 37 CFDE_XMLNode* m_pChild; 38 CFX_StackTemplate<CFDE_XMLNode*> m_NodeStack; 39 CFX_WideString m_ws1; 40 CFX_WideString m_ws2; 41 FDE_XmlSyntaxResult m_syntaxParserResult; 42 }; 43 44 #endif // XFA_FXFA_PARSER_CXFA_XML_PARSER_H_ 45