| 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 <memory> | |
| 11 #include <set> | 10 #include <set> |
| 12 | 11 |
| 13 #include "core/fxcrt/include/fx_string.h" | 12 #include "core/fxcrt/include/fx_string.h" |
| 14 #include "core/fxcrt/include/fx_system.h" | 13 #include "core/fxcrt/include/fx_system.h" |
| 15 | 14 |
| 16 class CPDF_Array; | 15 class CPDF_Array; |
| 17 class CPDF_Boolean; | 16 class CPDF_Boolean; |
| 18 class CPDF_Dictionary; | 17 class CPDF_Dictionary; |
| 19 class CPDF_Name; | 18 class CPDF_Name; |
| 20 class CPDF_Null; | 19 class CPDF_Null; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 virtual const CPDF_String* AsString() const; | 85 virtual const CPDF_String* AsString() const; |
| 87 | 86 |
| 88 protected: | 87 protected: |
| 89 friend class CPDF_Array; | 88 friend class CPDF_Array; |
| 90 friend class CPDF_Dictionary; | 89 friend class CPDF_Dictionary; |
| 91 friend class CPDF_Document; | 90 friend class CPDF_Document; |
| 92 friend class CPDF_IndirectObjectHolder; | 91 friend class CPDF_IndirectObjectHolder; |
| 93 friend class CPDF_Parser; | 92 friend class CPDF_Parser; |
| 94 friend class CPDF_Reference; | 93 friend class CPDF_Reference; |
| 95 friend class CPDF_Stream; | 94 friend class CPDF_Stream; |
| 96 friend struct std::default_delete<CPDF_Object>; | |
| 97 | 95 |
| 98 CPDF_Object() : m_ObjNum(0), m_GenNum(0) {} | 96 CPDF_Object() : m_ObjNum(0), m_GenNum(0) {} |
| 99 virtual ~CPDF_Object(); | 97 virtual ~CPDF_Object(); |
| 100 | 98 |
| 101 CPDF_Object* CloneObjectNonCyclic(bool bDirect) const; | 99 CPDF_Object* CloneObjectNonCyclic(bool bDirect) const; |
| 102 | 100 |
| 103 // Create a deep copy of the object with the option to either | 101 // Create a deep copy of the object with the option to either |
| 104 // copy a reference object or directly copy the object it refers to | 102 // copy a reference object or directly copy the object it refers to |
| 105 // when |bDirect| is true. | 103 // when |bDirect| is true. |
| 106 // Also check cyclic reference against |pVisited|, no copy if it is found. | 104 // Also check cyclic reference against |pVisited|, no copy if it is found. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 172 |
| 175 inline CPDF_Stream* ToStream(CPDF_Object* obj) { | 173 inline CPDF_Stream* ToStream(CPDF_Object* obj) { |
| 176 return obj ? obj->AsStream() : nullptr; | 174 return obj ? obj->AsStream() : nullptr; |
| 177 } | 175 } |
| 178 | 176 |
| 179 inline const CPDF_Stream* ToStream(const CPDF_Object* obj) { | 177 inline const CPDF_Stream* ToStream(const CPDF_Object* obj) { |
| 180 return obj ? obj->AsStream() : nullptr; | 178 return obj ? obj->AsStream() : nullptr; |
| 181 } | 179 } |
| 182 | 180 |
| 183 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ | 181 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ |
| OLD | NEW |