OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ |
8 #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ | 8 #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_string.h" | 10 #include "core/fxcrt/include/fx_string.h" |
(...skipping 28 matching lines...) Loading... |
39 uint32_t GetObjNum() const { return m_ObjNum; } | 39 uint32_t GetObjNum() const { return m_ObjNum; } |
40 uint32_t GetGenNum() const { return m_GenNum; } | 40 uint32_t GetGenNum() const { return m_GenNum; } |
41 | 41 |
42 virtual CPDF_Object* Clone(FX_BOOL bDirect = FALSE) const = 0; | 42 virtual CPDF_Object* Clone(FX_BOOL bDirect = FALSE) const = 0; |
43 virtual CPDF_Object* GetDirect() const; | 43 virtual CPDF_Object* GetDirect() const; |
44 | 44 |
45 FX_BOOL IsModified() const { return FALSE; } | 45 FX_BOOL IsModified() const { return FALSE; } |
46 void Release(); | 46 void Release(); |
47 | 47 |
48 virtual CFX_ByteString GetString() const; | 48 virtual CFX_ByteString GetString() const; |
| 49 |
| 50 // Note: |this| must outlive the use of |GetConstString|'s result. |
49 virtual CFX_ByteStringC GetConstString() const; | 51 virtual CFX_ByteStringC GetConstString() const; |
50 virtual CFX_WideString GetUnicodeText() const; | 52 virtual CFX_WideString GetUnicodeText() const; |
51 virtual FX_FLOAT GetNumber() const; | 53 virtual FX_FLOAT GetNumber() const; |
52 virtual int GetInteger() const; | 54 virtual int GetInteger() const; |
53 virtual CPDF_Dictionary* GetDict() const; | 55 virtual CPDF_Dictionary* GetDict() const; |
54 virtual CPDF_Array* GetArray() const; | 56 virtual CPDF_Array* GetArray() const; |
55 | 57 |
56 virtual void SetString(const CFX_ByteString& str); | 58 virtual void SetString(const CFX_ByteString& str); |
57 | 59 |
58 virtual bool IsArray() const; | 60 virtual bool IsArray() const; |
(...skipping 94 matching lines...) Loading... |
153 | 155 |
154 inline CPDF_Stream* ToStream(CPDF_Object* obj) { | 156 inline CPDF_Stream* ToStream(CPDF_Object* obj) { |
155 return obj ? obj->AsStream() : nullptr; | 157 return obj ? obj->AsStream() : nullptr; |
156 } | 158 } |
157 | 159 |
158 inline const CPDF_Stream* ToStream(const CPDF_Object* obj) { | 160 inline const CPDF_Stream* ToStream(const CPDF_Object* obj) { |
159 return obj ? obj->AsStream() : nullptr; | 161 return obj ? obj->AsStream() : nullptr; |
160 } | 162 } |
161 | 163 |
162 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ | 164 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ |
OLD | NEW |