Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ | 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ |
| 8 #define CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ | 8 #define CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ |
| 9 | 9 |
| 10 #include "core/include/fxcrt/fx_coordinates.h" | 10 #include "core/include/fxcrt/fx_coordinates.h" |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 602 | 602 |
| 603 CPDF_Object* GetIndirectObject(FX_DWORD objnum, | 603 CPDF_Object* GetIndirectObject(FX_DWORD objnum, |
| 604 struct PARSE_CONTEXT* pContext = NULL); | 604 struct PARSE_CONTEXT* pContext = NULL); |
| 605 | 605 |
| 606 int GetIndirectType(FX_DWORD objnum); | 606 int GetIndirectType(FX_DWORD objnum); |
| 607 | 607 |
| 608 FX_DWORD AddIndirectObject(CPDF_Object* pObj); | 608 FX_DWORD AddIndirectObject(CPDF_Object* pObj); |
| 609 | 609 |
| 610 void ReleaseIndirectObject(FX_DWORD objnum); | 610 void ReleaseIndirectObject(FX_DWORD objnum); |
| 611 | 611 |
| 612 void InsertIndirectObject(FX_DWORD objnum, CPDF_Object* pObj); | 612 FX_BOOL InsertIndirectObject(FX_DWORD objnum, CPDF_Object* pObj); |
|
Tom Sepez
2015/12/10 17:32:12
nit: add a comment
// Takes ownership of |pObj|.
jun_fang
2015/12/10 23:24:26
Acknowledged.
| |
| 613 | 613 |
| 614 FX_DWORD GetLastObjNum() const; | 614 FX_DWORD GetLastObjNum() const; |
| 615 | 615 |
| 616 FX_POSITION GetStartPosition() const { | 616 FX_POSITION GetStartPosition() const { |
| 617 return m_IndirectObjs.GetStartPosition(); | 617 return m_IndirectObjs.GetStartPosition(); |
| 618 } | 618 } |
| 619 | 619 |
| 620 void GetNextAssoc(FX_POSITION& rPos, | 620 void GetNextAssoc(FX_POSITION& rPos, |
| 621 FX_DWORD& objnum, | 621 FX_DWORD& objnum, |
| 622 CPDF_Object*& pObject) const { | 622 CPDF_Object*& pObject) const { |
| 623 m_IndirectObjs.GetNextAssoc(rPos, (void*&)objnum, (void*&)pObject); | 623 m_IndirectObjs.GetNextAssoc(rPos, (void*&)objnum, (void*&)pObject); |
| 624 } | 624 } |
| 625 | 625 |
| 626 protected: | 626 protected: |
| 627 CFX_MapPtrToPtr m_IndirectObjs; | 627 CFX_MapPtrToPtr m_IndirectObjs; |
| 628 | 628 |
| 629 CPDF_Parser* m_pParser; | 629 CPDF_Parser* m_pParser; |
| 630 | 630 |
| 631 FX_DWORD m_LastObjNum; | 631 FX_DWORD m_LastObjNum; |
| 632 }; | 632 }; |
| 633 | 633 |
| 634 #endif // CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ | 634 #endif // CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ |
| OLD | NEW |