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_ARRAY_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_ARRAY_H_ |
8 #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_ARRAY_H_ | 8 #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_ARRAY_H_ |
9 | 9 |
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 FX_FLOAT GetFloatAt(uint32_t index) const { return GetNumberAt(index); } | 37 FX_FLOAT GetFloatAt(uint32_t index) const { return GetNumberAt(index); } |
38 CFX_Matrix GetMatrix(); | 38 CFX_Matrix GetMatrix(); |
39 CFX_FloatRect GetRect(); | 39 CFX_FloatRect GetRect(); |
40 | 40 |
41 void SetAt(uint32_t index, | 41 void SetAt(uint32_t index, |
42 CPDF_Object* pObj, | 42 CPDF_Object* pObj, |
43 CPDF_IndirectObjectHolder* pObjs = nullptr); | 43 CPDF_IndirectObjectHolder* pObjs = nullptr); |
44 void InsertAt(uint32_t index, | 44 void InsertAt(uint32_t index, |
45 CPDF_Object* pObj, | 45 CPDF_Object* pObj, |
46 CPDF_IndirectObjectHolder* pObjs = nullptr); | 46 CPDF_IndirectObjectHolder* pObjs = nullptr); |
47 void RemoveAt(uint32_t index, int nCount = 1); | 47 void RemoveAt(uint32_t index, uint32_t nCount = 1); |
48 | 48 |
49 void Add(CPDF_Object* pObj, CPDF_IndirectObjectHolder* pObjs = nullptr); | 49 void Add(CPDF_Object* pObj, CPDF_IndirectObjectHolder* pObjs = nullptr); |
50 void AddNumber(FX_FLOAT f); | 50 void AddNumber(FX_FLOAT f); |
51 void AddInteger(int i); | 51 void AddInteger(int i); |
52 void AddString(const CFX_ByteString& str); | 52 void AddString(const CFX_ByteString& str); |
53 void AddName(const CFX_ByteString& str); | 53 void AddName(const CFX_ByteString& str); |
54 void AddReference(CPDF_IndirectObjectHolder* pDoc, uint32_t objnum); | 54 void AddReference(CPDF_IndirectObjectHolder* pDoc, uint32_t objnum); |
55 void AddReference(CPDF_IndirectObjectHolder* pDoc, CPDF_Object* obj) { | 55 void AddReference(CPDF_IndirectObjectHolder* pDoc, CPDF_Object* obj) { |
56 AddReference(pDoc, obj->GetObjNum()); | 56 AddReference(pDoc, obj->GetObjNum()); |
57 } | 57 } |
58 | 58 |
59 protected: | 59 protected: |
60 ~CPDF_Array() override; | 60 ~CPDF_Array() override; |
61 | 61 |
62 CFX_ArrayTemplate<CPDF_Object*> m_Objects; | 62 CFX_ArrayTemplate<CPDF_Object*> m_Objects; |
63 }; | 63 }; |
64 | 64 |
65 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_ARRAY_H_ | 65 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_ARRAY_H_ |
OLD | NEW |