Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: core/fpdfapi/parser/cpdf_parser.h

Issue 2411703003: Get rid of CFX_ArrayTemplate<CPDF_Object*> (Closed)
Patch Set: nit Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fpdfapi/parser/cpdf_data_avail.cpp ('k') | core/fpdfapi/parser/cpdf_parser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_PARSER_H_ 7 #ifndef CORE_FPDFAPI_PARSER_CPDF_PARSER_H_
8 #define CORE_FPDFAPI_PARSER_CPDF_PARSER_H_ 8 #define CORE_FPDFAPI_PARSER_CPDF_PARSER_H_
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <set> 12 #include <set>
13 #include <vector>
13 14
14 #include "core/fxcrt/fx_basic.h" 15 #include "core/fxcrt/fx_basic.h"
15 16
16 class CPDF_Array; 17 class CPDF_Array;
17 class CPDF_CryptoHandler; 18 class CPDF_CryptoHandler;
18 class CPDF_Dictionary; 19 class CPDF_Dictionary;
19 class CPDF_Document; 20 class CPDF_Document;
20 class CPDF_IndirectObjectHolder; 21 class CPDF_IndirectObjectHolder;
21 class CPDF_Object; 22 class CPDF_Object;
22 class CPDF_SecurityHandler; 23 class CPDF_SecurityHandler;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 bool m_bHasParsed; 147 bool m_bHasParsed;
147 bool m_bOwnFileRead; 148 bool m_bOwnFileRead;
148 int m_FileVersion; 149 int m_FileVersion;
149 CPDF_Dictionary* m_pTrailer; 150 CPDF_Dictionary* m_pTrailer;
150 CPDF_Dictionary* m_pEncryptDict; 151 CPDF_Dictionary* m_pEncryptDict;
151 FX_FILESIZE m_LastXRefOffset; 152 FX_FILESIZE m_LastXRefOffset;
152 FX_BOOL m_bXRefStream; 153 FX_BOOL m_bXRefStream;
153 std::unique_ptr<CPDF_SecurityHandler> m_pSecurityHandler; 154 std::unique_ptr<CPDF_SecurityHandler> m_pSecurityHandler;
154 CFX_ByteString m_Password; 155 CFX_ByteString m_Password;
155 std::set<FX_FILESIZE> m_SortedOffset; 156 std::set<FX_FILESIZE> m_SortedOffset;
156 CFX_ArrayTemplate<CPDF_Dictionary*> m_Trailers; 157 std::vector<CPDF_Dictionary*> m_Trailers;
157 bool m_bVersionUpdated; 158 bool m_bVersionUpdated;
158 CPDF_Object* m_pLinearized; 159 CPDF_Object* m_pLinearized;
159 uint32_t m_dwFirstPageNo; 160 uint32_t m_dwFirstPageNo;
160 uint32_t m_dwXrefStartObjNum; 161 uint32_t m_dwXrefStartObjNum;
161 162
162 // A map of object numbers to indirect streams. Map owns the streams. 163 // A map of object numbers to indirect streams. Map owns the streams.
163 std::map<uint32_t, std::unique_ptr<CPDF_StreamAcc>> m_ObjectStreamMap; 164 std::map<uint32_t, std::unique_ptr<CPDF_StreamAcc>> m_ObjectStreamMap;
164 165
165 // Mapping of object numbers to offsets. The offsets are relative to the first 166 // Mapping of object numbers to offsets. The offsets are relative to the first
166 // object in the stream. 167 // object in the stream.
167 using StreamObjectCache = std::map<uint32_t, uint32_t>; 168 using StreamObjectCache = std::map<uint32_t, uint32_t>;
168 169
169 // Mapping of streams to their object caches. This is valid as long as the 170 // Mapping of streams to their object caches. This is valid as long as the
170 // streams in |m_ObjectStreamMap| are valid. 171 // streams in |m_ObjectStreamMap| are valid.
171 std::map<CPDF_StreamAcc*, StreamObjectCache> m_ObjCache; 172 std::map<CPDF_StreamAcc*, StreamObjectCache> m_ObjCache;
172 173
173 // All indirect object numbers that are being parsed. 174 // All indirect object numbers that are being parsed.
174 std::set<uint32_t> m_ParsingObjNums; 175 std::set<uint32_t> m_ParsingObjNums;
175 }; 176 };
176 177
177 #endif // CORE_FPDFAPI_PARSER_CPDF_PARSER_H_ 178 #endif // CORE_FPDFAPI_PARSER_CPDF_PARSER_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/parser/cpdf_data_avail.cpp ('k') | core/fpdfapi/parser/cpdf_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698