| 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_INCLUDE_FX_BASIC_H_ | 7 #ifndef CORE_FXCRT_INCLUDE_FX_BASIC_H_ |
| 8 #define CORE_FXCRT_INCLUDE_FX_BASIC_H_ | 8 #define CORE_FXCRT_INCLUDE_FX_BASIC_H_ |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 CFX_ByteTextBuf& operator<<(const CFX_ByteTextBuf& buf); | 73 CFX_ByteTextBuf& operator<<(const CFX_ByteTextBuf& buf); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 class CFX_WideTextBuf : public CFX_BinaryBuf { | 76 class CFX_WideTextBuf : public CFX_BinaryBuf { |
| 77 public: | 77 public: |
| 78 void AppendChar(FX_WCHAR wch); | 78 void AppendChar(FX_WCHAR wch); |
| 79 FX_STRSIZE GetLength() const { return m_DataSize / sizeof(FX_WCHAR); } | 79 FX_STRSIZE GetLength() const { return m_DataSize / sizeof(FX_WCHAR); } |
| 80 FX_WCHAR* GetBuffer() const { | 80 FX_WCHAR* GetBuffer() const { |
| 81 return reinterpret_cast<FX_WCHAR*>(m_pBuffer.get()); | 81 return reinterpret_cast<FX_WCHAR*>(m_pBuffer.get()); |
| 82 } | 82 } |
| 83 CFX_WideStringC AsStringC() const; | 83 |
| 84 CFX_WideStringC AsStringC() const { |
| 85 return CFX_WideStringC(reinterpret_cast<const FX_WCHAR*>(m_pBuffer.get()), |
| 86 m_DataSize / sizeof(FX_WCHAR)); |
| 87 } |
| 88 CFX_WideString MakeString() const { |
| 89 return CFX_WideString(reinterpret_cast<const FX_WCHAR*>(m_pBuffer.get()), |
| 90 m_DataSize / sizeof(FX_WCHAR)); |
| 91 } |
| 84 | 92 |
| 85 void Delete(int start_index, int count) { | 93 void Delete(int start_index, int count) { |
| 86 CFX_BinaryBuf::Delete(start_index * sizeof(FX_WCHAR), | 94 CFX_BinaryBuf::Delete(start_index * sizeof(FX_WCHAR), |
| 87 count * sizeof(FX_WCHAR)); | 95 count * sizeof(FX_WCHAR)); |
| 88 } | 96 } |
| 89 | 97 |
| 90 CFX_WideTextBuf& operator<<(int i); | 98 CFX_WideTextBuf& operator<<(int i); |
| 91 CFX_WideTextBuf& operator<<(double f); | 99 CFX_WideTextBuf& operator<<(double f); |
| 92 CFX_WideTextBuf& operator<<(const FX_WCHAR* lpsz); | 100 CFX_WideTextBuf& operator<<(const FX_WCHAR* lpsz); |
| 93 CFX_WideTextBuf& operator<<(const CFX_WideStringC& str); | 101 CFX_WideTextBuf& operator<<(const CFX_WideStringC& str); |
| (...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 FX_FLOAT c; | 1057 FX_FLOAT c; |
| 1050 FX_FLOAT d; | 1058 FX_FLOAT d; |
| 1051 FX_FLOAT e; | 1059 FX_FLOAT e; |
| 1052 FX_FLOAT f; | 1060 FX_FLOAT f; |
| 1053 FX_FLOAT g; | 1061 FX_FLOAT g; |
| 1054 FX_FLOAT h; | 1062 FX_FLOAT h; |
| 1055 FX_FLOAT i; | 1063 FX_FLOAT i; |
| 1056 }; | 1064 }; |
| 1057 | 1065 |
| 1058 #endif // CORE_FXCRT_INCLUDE_FX_BASIC_H_ | 1066 #endif // CORE_FXCRT_INCLUDE_FX_BASIC_H_ |
| OLD | NEW |