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 _FXCRT_XML_INT_ | 7 #ifndef _FXCRT_XML_INT_ |
8 #define _FXCRT_XML_INT_ | 8 #define _FXCRT_XML_INT_ |
9 class CXML_DataBufAcc : public IFX_BufferRead, public CFX_Object | 9 class CXML_DataBufAcc : public IFX_BufferRead |
10 { | 10 { |
11 public: | 11 public: |
12 CXML_DataBufAcc(FX_LPCBYTE pBuffer, size_t size) | 12 CXML_DataBufAcc(FX_LPCBYTE pBuffer, size_t size) |
13 : m_pBuffer(pBuffer) | 13 : m_pBuffer(pBuffer) |
14 , m_dwSize(size) | 14 , m_dwSize(size) |
15 , m_dwCurPos(0) | 15 , m_dwCurPos(0) |
16 { | 16 { |
17 } | 17 } |
18 virtual ~CXML_DataBufAcc() {} | 18 virtual ~CXML_DataBufAcc() {} |
19 virtual void Release() | 19 virtual void Release() |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 virtual FX_FILESIZE GetBlockOffset() | 54 virtual FX_FILESIZE GetBlockOffset() |
55 { | 55 { |
56 return 0; | 56 return 0; |
57 } | 57 } |
58 protected: | 58 protected: |
59 FX_LPCBYTE m_pBuffer; | 59 FX_LPCBYTE m_pBuffer; |
60 size_t m_dwSize; | 60 size_t m_dwSize; |
61 size_t m_dwCurPos; | 61 size_t m_dwCurPos; |
62 }; | 62 }; |
63 #define FX_XMLDATASTREAM_BufferSize (32 * 1024) | 63 #define FX_XMLDATASTREAM_BufferSize (32 * 1024) |
64 class CXML_DataStmAcc : public IFX_BufferRead, public CFX_Object | 64 class CXML_DataStmAcc : public IFX_BufferRead |
65 { | 65 { |
66 public: | 66 public: |
67 CXML_DataStmAcc(IFX_FileRead *pFileRead) | 67 CXML_DataStmAcc(IFX_FileRead *pFileRead) |
68 : m_pFileRead(pFileRead) | 68 : m_pFileRead(pFileRead) |
69 , m_pBuffer(NULL) | 69 , m_pBuffer(NULL) |
70 , m_nStart(0) | 70 , m_nStart(0) |
71 , m_dwSize(0) | 71 , m_dwSize(0) |
72 { | 72 { |
73 FXSYS_assert(m_pFileRead != NULL); | 73 FXSYS_assert(m_pFileRead != NULL); |
74 } | 74 } |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 void GetAttrValue(CFX_WideString &value); | 155 void GetAttrValue(CFX_WideString &value); |
156 FX_DWORD GetCharRef(); | 156 FX_DWORD GetCharRef(); |
157 void GetTagName(CFX_ByteString &space, CFX_ByteString
&name, FX_BOOL &bEndTag, FX_BOOL bStartTag = FALSE); | 157 void GetTagName(CFX_ByteString &space, CFX_ByteString
&name, FX_BOOL &bEndTag, FX_BOOL bStartTag = FALSE); |
158 void SkipLiterals(FX_BSTR str); | 158 void SkipLiterals(FX_BSTR str); |
159 CXML_Element* ParseElement(CXML_Element* pParent, FX_BOOL bStartTag =
FALSE); | 159 CXML_Element* ParseElement(CXML_Element* pParent, FX_BOOL bStartTag =
FALSE); |
160 void InsertContentSegment(FX_BOOL bCDATA, FX_WSTR con
tent, CXML_Element* pElement); | 160 void InsertContentSegment(FX_BOOL bCDATA, FX_WSTR con
tent, CXML_Element* pElement); |
161 void InsertCDATASegment(CFX_UTF8Decoder& decoder, CXM
L_Element* pElement); | 161 void InsertCDATASegment(CFX_UTF8Decoder& decoder, CXM
L_Element* pElement); |
162 }; | 162 }; |
163 void FX_XML_SplitQualifiedName(FX_BSTR bsFullName, CFX_ByteStringC &bsSpace, CFX
_ByteStringC &bsName); | 163 void FX_XML_SplitQualifiedName(FX_BSTR bsFullName, CFX_ByteStringC &bsSpace, CFX
_ByteStringC &bsName); |
164 #endif | 164 #endif |
OLD | NEW |