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_PARSER_CPDF_OBJECT_H_ | 7 #ifndef CORE_FPDFAPI_PARSER_CPDF_OBJECT_H_ |
8 #define CORE_FPDFAPI_PARSER_CPDF_OBJECT_H_ | 8 #define CORE_FPDFAPI_PARSER_CPDF_OBJECT_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <set> | 11 #include <set> |
| 12 #include <type_traits> |
12 | 13 |
13 #include "core/fxcrt/fx_string.h" | 14 #include "core/fxcrt/fx_string.h" |
14 #include "core/fxcrt/fx_system.h" | 15 #include "core/fxcrt/fx_system.h" |
15 | 16 |
16 class CPDF_Array; | 17 class CPDF_Array; |
17 class CPDF_Boolean; | 18 class CPDF_Boolean; |
18 class CPDF_Dictionary; | 19 class CPDF_Dictionary; |
19 class CPDF_Name; | 20 class CPDF_Name; |
20 class CPDF_Null; | 21 class CPDF_Null; |
21 class CPDF_Number; | 22 class CPDF_Number; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 bool bDirect, | 111 bool bDirect, |
111 std::set<const CPDF_Object*>* pVisited) const; | 112 std::set<const CPDF_Object*>* pVisited) const; |
112 | 113 |
113 uint32_t m_ObjNum; | 114 uint32_t m_ObjNum; |
114 uint32_t m_GenNum; | 115 uint32_t m_GenNum; |
115 | 116 |
116 private: | 117 private: |
117 CPDF_Object(const CPDF_Object& src) {} | 118 CPDF_Object(const CPDF_Object& src) {} |
118 }; | 119 }; |
119 | 120 |
| 121 template <typename T> |
| 122 struct CanInternStrings { |
| 123 static const bool value = std::is_same<T, CPDF_Array>::value || |
| 124 std::is_same<T, CPDF_Dictionary>::value || |
| 125 std::is_same<T, CPDF_Name>::value || |
| 126 std::is_same<T, CPDF_String>::value; |
| 127 }; |
| 128 |
120 #endif // CORE_FPDFAPI_PARSER_CPDF_OBJECT_H_ | 129 #endif // CORE_FPDFAPI_PARSER_CPDF_OBJECT_H_ |
OLD | NEW |