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 CORE_FXCRT_FX_BASIC_H_ | 7 #ifndef CORE_FXCRT_FX_BASIC_H_ |
8 #define CORE_FXCRT_FX_BASIC_H_ | 8 #define CORE_FXCRT_FX_BASIC_H_ |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 ~CFX_FileBufferArchive(); | 114 ~CFX_FileBufferArchive(); |
115 | 115 |
116 void Clear(); | 116 void Clear(); |
117 bool Flush(); | 117 bool Flush(); |
118 int32_t AppendBlock(const void* pBuf, size_t size); | 118 int32_t AppendBlock(const void* pBuf, size_t size); |
119 int32_t AppendByte(uint8_t byte); | 119 int32_t AppendByte(uint8_t byte); |
120 int32_t AppendDWord(uint32_t i); | 120 int32_t AppendDWord(uint32_t i); |
121 int32_t AppendString(const CFX_ByteStringC& lpsz); | 121 int32_t AppendString(const CFX_ByteStringC& lpsz); |
122 | 122 |
123 // |pFile| must outlive the CFX_FileBufferArchive. | 123 // |pFile| must outlive the CFX_FileBufferArchive. |
124 void AttachFile(IFX_StreamWrite* pFile); | 124 void AttachFile(IFX_WriteStream* pFile); |
125 | 125 |
126 private: | 126 private: |
127 static const size_t kBufSize = 32768; | 127 static const size_t kBufSize = 32768; |
128 | 128 |
129 size_t m_Length; | 129 size_t m_Length; |
130 std::unique_ptr<uint8_t, FxFreeDeleter> m_pBuffer; | 130 std::unique_ptr<uint8_t, FxFreeDeleter> m_pBuffer; |
131 IFX_StreamWrite* m_pFile; | 131 IFX_WriteStream* m_pFile; |
132 }; | 132 }; |
133 | 133 |
134 class CFX_CharMap { | 134 class CFX_CharMap { |
135 public: | 135 public: |
136 static CFX_ByteString GetByteString(uint16_t codepage, | 136 static CFX_ByteString GetByteString(uint16_t codepage, |
137 const CFX_WideStringC& wstr); | 137 const CFX_WideStringC& wstr); |
138 | 138 |
139 static CFX_WideString GetWideString(uint16_t codepage, | 139 static CFX_WideString GetWideString(uint16_t codepage, |
140 const CFX_ByteStringC& bstr); | 140 const CFX_ByteStringC& bstr); |
141 | 141 |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 FX_FLOAT e; | 851 FX_FLOAT e; |
852 FX_FLOAT f; | 852 FX_FLOAT f; |
853 FX_FLOAT g; | 853 FX_FLOAT g; |
854 FX_FLOAT h; | 854 FX_FLOAT h; |
855 FX_FLOAT i; | 855 FX_FLOAT i; |
856 }; | 856 }; |
857 | 857 |
858 uint32_t GetBits32(const uint8_t* pData, int bitpos, int nbits); | 858 uint32_t GetBits32(const uint8_t* pData, int bitpos, int nbits); |
859 | 859 |
860 #endif // CORE_FXCRT_FX_BASIC_H_ | 860 #endif // CORE_FXCRT_FX_BASIC_H_ |
OLD | NEW |