// Copyright 2016 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #ifndef XFA_FXFA_PARSER_CXFA_DOCUMENT_PARSER_H_ #define XFA_FXFA_PARSER_CXFA_DOCUMENT_PARSER_H_ #include #include "xfa/fxfa/parser/cxfa_simple_parser.h" class CFX_XMLDoc; class CXFA_Document; class CXFA_FFNotify; class CXFA_Notify; class IFX_SeekableStream; class CXFA_DocumentParser { public: explicit CXFA_DocumentParser(CXFA_FFNotify* pNotify); ~CXFA_DocumentParser(); int32_t Parse(const RetainPtr& pStream, XFA_PacketType ePacketID); CXFA_FFNotify* GetNotify() const; CXFA_Document* GetDocument() const; private: UnownedPtr const m_pNotify; // Note, the |m_nodeParser| has an unowned pointer to the |m_pDocument| so // the |m_nodeParser| must be cleaned up first. std::unique_ptr m_pDocument; CXFA_SimpleParser m_nodeParser; }; #endif // XFA_FXFA_PARSER_CXFA_DOCUMENT_PARSER_H_