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...) Expand all 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. | |
51 virtual CFX_ByteStringC GetConstString() const; | |
52 virtual CFX_WideString GetUnicodeText() const; | 49 virtual CFX_WideString GetUnicodeText() const; |
53 virtual FX_FLOAT GetNumber() const; | 50 virtual FX_FLOAT GetNumber() const; |
54 virtual int GetInteger() const; | 51 virtual int GetInteger() const; |
55 virtual CPDF_Dictionary* GetDict() const; | 52 virtual CPDF_Dictionary* GetDict() const; |
56 virtual CPDF_Array* GetArray() const; | 53 virtual CPDF_Array* GetArray() const; |
57 | 54 |
58 virtual void SetString(const CFX_ByteString& str); | 55 virtual void SetString(const CFX_ByteString& str); |
59 | 56 |
60 virtual bool IsArray() const; | 57 virtual bool IsArray() const; |
61 virtual bool IsBoolean() const; | 58 virtual bool IsBoolean() const; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 152 |
156 inline CPDF_Stream* ToStream(CPDF_Object* obj) { | 153 inline CPDF_Stream* ToStream(CPDF_Object* obj) { |
157 return obj ? obj->AsStream() : nullptr; | 154 return obj ? obj->AsStream() : nullptr; |
158 } | 155 } |
159 | 156 |
160 inline const CPDF_Stream* ToStream(const CPDF_Object* obj) { | 157 inline const CPDF_Stream* ToStream(const CPDF_Object* obj) { |
161 return obj ? obj->AsStream() : nullptr; | 158 return obj ? obj->AsStream() : nullptr; |
162 } | 159 } |
163 | 160 |
164 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ | 161 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ |
OLD | NEW |