OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_FXFA_PARSER_XFA_PARSER_IMP_H_ | 7 #ifndef XFA_FXFA_PARSER_XFA_PARSER_IMP_H_ |
8 #define XFA_FXFA_PARSER_XFA_PARSER_IMP_H_ | 8 #define XFA_FXFA_PARSER_XFA_PARSER_IMP_H_ |
9 | 9 |
10 #include "xfa/fde/xml/fde_xml_imp.h" | 10 #include "xfa/fde/xml/fde_xml_imp.h" |
11 #include "xfa/fxfa/parser/xfa_parser.h" | 11 #include "xfa/fxfa/parser/xfa_parser.h" |
12 | 12 |
13 class CXFA_XMLParser; | 13 class CXFA_XMLParser; |
14 | 14 |
15 class CXFA_SimpleParser : public IXFA_Parser { | 15 class CXFA_SimpleParser : public IXFA_Parser { |
16 public: | 16 public: |
17 CXFA_SimpleParser(CXFA_Document* pFactory, FX_BOOL bDocumentParser = FALSE); | 17 CXFA_SimpleParser(CXFA_Document* pFactory, FX_BOOL bDocumentParser = FALSE); |
18 ~CXFA_SimpleParser() override; | 18 ~CXFA_SimpleParser() override; |
19 | 19 |
20 // IXFA_Parser | 20 // IXFA_Parser |
21 void Release() override; | 21 void Release() override; |
22 int32_t StartParse(IFX_FileRead* pStream, | 22 int32_t StartParse(IFX_FileRead* pStream, |
23 XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) override; | 23 XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) override; |
24 int32_t DoParse(IFX_Pause* pPause = NULL) override; | 24 int32_t DoParse(IFX_Pause* pPause = nullptr) override; |
25 int32_t ParseXMLData(const CFX_WideString& wsXML, | 25 int32_t ParseXMLData(const CFX_WideString& wsXML, |
26 CFDE_XMLNode*& pXMLNode, | 26 CFDE_XMLNode*& pXMLNode, |
27 IFX_Pause* pPause = NULL) override; | 27 IFX_Pause* pPause = nullptr) override; |
28 void ConstructXFANode(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLNode) override; | 28 void ConstructXFANode(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLNode) override; |
29 CXFA_Document* GetFactory() const override; | 29 CXFA_Document* GetFactory() const override; |
30 CXFA_Node* GetRootNode() const override; | 30 CXFA_Node* GetRootNode() const override; |
31 CFDE_XMLDoc* GetXMLDoc() const override; | 31 CFDE_XMLDoc* GetXMLDoc() const override; |
32 void CloseParser() override; | 32 void CloseParser() override; |
33 | 33 |
34 protected: | 34 protected: |
35 CXFA_Node* ParseAsXDPPacket(CFDE_XMLNode* pXMLDocumentNode, | 35 CXFA_Node* ParseAsXDPPacket(CFDE_XMLNode* pXMLDocumentNode, |
36 XFA_XDPPACKET ePacketID); | 36 XFA_XDPPACKET ePacketID); |
37 CXFA_Node* ParseAsXDPPacket_XDP(CFDE_XMLNode* pXMLDocumentNode, | 37 CXFA_Node* ParseAsXDPPacket_XDP(CFDE_XMLNode* pXMLDocumentNode, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 class CXFA_DocumentParser : public IXFA_Parser { | 85 class CXFA_DocumentParser : public IXFA_Parser { |
86 public: | 86 public: |
87 CXFA_DocumentParser(CXFA_FFNotify* pNotify); | 87 CXFA_DocumentParser(CXFA_FFNotify* pNotify); |
88 ~CXFA_DocumentParser() override; | 88 ~CXFA_DocumentParser() override; |
89 | 89 |
90 // IXFA_Parser | 90 // IXFA_Parser |
91 void Release() override; | 91 void Release() override; |
92 int32_t StartParse(IFX_FileRead* pStream, | 92 int32_t StartParse(IFX_FileRead* pStream, |
93 XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) override; | 93 XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) override; |
94 int32_t DoParse(IFX_Pause* pPause = NULL) override; | 94 int32_t DoParse(IFX_Pause* pPause = nullptr) override; |
95 int32_t ParseXMLData(const CFX_WideString& wsXML, | 95 int32_t ParseXMLData(const CFX_WideString& wsXML, |
96 CFDE_XMLNode*& pXMLNode, | 96 CFDE_XMLNode*& pXMLNode, |
97 IFX_Pause* pPause = NULL) override; | 97 IFX_Pause* pPause = nullptr) override; |
98 void ConstructXFANode(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLNode) override; | 98 void ConstructXFANode(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLNode) override; |
99 CXFA_Document* GetFactory() const override; | 99 CXFA_Document* GetFactory() const override; |
100 CXFA_Node* GetRootNode() const override; | 100 CXFA_Node* GetRootNode() const override; |
101 CFDE_XMLDoc* GetXMLDoc() const override; | 101 CFDE_XMLDoc* GetXMLDoc() const override; |
102 CXFA_FFNotify* GetNotify() const; | 102 CXFA_FFNotify* GetNotify() const; |
103 CXFA_Document* GetDocument() const; | 103 CXFA_Document* GetDocument() const; |
104 void CloseParser() override; | 104 void CloseParser() override; |
105 | 105 |
106 protected: | 106 protected: |
107 CXFA_SimpleParser m_nodeParser; | 107 CXFA_SimpleParser m_nodeParser; |
(...skipping 22 matching lines...) Expand all Loading... |
130 CFDE_XMLSyntaxParser* m_pParser; | 130 CFDE_XMLSyntaxParser* m_pParser; |
131 CFDE_XMLNode* m_pParent; | 131 CFDE_XMLNode* m_pParent; |
132 CFDE_XMLNode* m_pChild; | 132 CFDE_XMLNode* m_pChild; |
133 CFX_StackTemplate<CFDE_XMLNode*> m_NodeStack; | 133 CFX_StackTemplate<CFDE_XMLNode*> m_NodeStack; |
134 CFX_WideString m_ws1; | 134 CFX_WideString m_ws1; |
135 CFX_WideString m_ws2; | 135 CFX_WideString m_ws2; |
136 FDE_XmlSyntaxResult m_syntaxParserResult; | 136 FDE_XmlSyntaxResult m_syntaxParserResult; |
137 }; | 137 }; |
138 | 138 |
139 #endif // XFA_FXFA_PARSER_XFA_PARSER_IMP_H_ | 139 #endif // XFA_FXFA_PARSER_XFA_PARSER_IMP_H_ |
OLD | NEW |