• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 CORE_FXCRT_XML_CFX_XMLPARSER_H_
8 #define CORE_FXCRT_XML_CFX_XMLPARSER_H_
9 
10 #include <memory>
11 #include <stack>
12 
13 #include "core/fxcrt/fx_string.h"
14 #include "core/fxcrt/retain_ptr.h"
15 #include "core/fxcrt/xml/cfx_xmlsyntaxparser.h"
16 
17 class CFX_XMLElement;
18 class CFX_XMLNode;
19 class CFX_SeekableStreamProxy;
20 
21 class CFX_XMLParser {
22  public:
23   CFX_XMLParser(CFX_XMLNode* pParent,
24                 const RetainPtr<CFX_SeekableStreamProxy>& pStream);
25   ~CFX_XMLParser();
26 
27   int32_t DoParser();
28 
29   FX_FILESIZE m_nStart[2];
30   size_t m_nSize[2];
31   FX_FILESIZE m_nElementStart;
32   uint16_t m_dwCheckStatus;
33   uint16_t m_dwCurrentCheckStatus;
34 
35  private:
36   RetainPtr<CFX_SeekableStreamProxy> m_pStream;
37   std::unique_ptr<CFX_XMLSyntaxParser> m_pParser;
38   CFX_XMLNode* m_pParent;
39   CFX_XMLNode* m_pChild;
40   std::stack<CFX_XMLNode*> m_NodeStack;
41   WideString m_ws1;
42   WideString m_ws2;
43   FX_XmlSyntaxResult m_syntaxParserResult;
44 };
45 
46 #endif  // CORE_FXCRT_XML_CFX_XMLPARSER_H_
47