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

Side by Side Diff: core/include/fpdfapi/cpdf_indirect_object_holder.h

Issue 1805603002: core/include/fdpfapi cleanup Part I. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 9 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/include/fpdfapi/cpdf_document.h ('k') | core/include/fpdfapi/cpdf_name.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef CORE_INCLUDE_FPDFAPI_CPDF_INDIRECT_OBJECT_HOLDER_H_
8 #define CORE_INCLUDE_FPDFAPI_CPDF_INDIRECT_OBJECT_HOLDER_H_
9
10 #include <map>
11
12 #include "core/include/fxcrt/fx_system.h"
13
14 class CPDF_Object;
15 class CPDF_Parser;
16
17 class CPDF_IndirectObjectHolder {
18 public:
19 using iterator = std::map<FX_DWORD, CPDF_Object*>::iterator;
20 using const_iterator = std::map<FX_DWORD, CPDF_Object*>::const_iterator;
21
22 explicit CPDF_IndirectObjectHolder(CPDF_Parser* pParser);
23 ~CPDF_IndirectObjectHolder();
24
25 CPDF_Object* GetIndirectObject(FX_DWORD objnum);
26 FX_DWORD AddIndirectObject(CPDF_Object* pObj);
27 void ReleaseIndirectObject(FX_DWORD objnum);
28
29 // Takes ownership of |pObj|.
30 FX_BOOL InsertIndirectObject(FX_DWORD objnum, CPDF_Object* pObj);
31
32 FX_DWORD GetLastObjNum() const { return m_LastObjNum; }
33 iterator begin() { return m_IndirectObjs.begin(); }
34 const_iterator begin() const { return m_IndirectObjs.begin(); }
35 iterator end() { return m_IndirectObjs.end(); }
36 const_iterator end() const { return m_IndirectObjs.end(); }
37
38 protected:
39 CPDF_Parser* m_pParser;
40 FX_DWORD m_LastObjNum;
41 std::map<FX_DWORD, CPDF_Object*> m_IndirectObjs;
42 };
43
44 #endif // CORE_INCLUDE_FPDFAPI_CPDF_INDIRECT_OBJECT_HOLDER_H_
OLDNEW
« no previous file with comments | « core/include/fpdfapi/cpdf_document.h ('k') | core/include/fpdfapi/cpdf_name.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698