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 <set> | 10 #include <set> |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 ~CPDF_IndirectObjects(); | 604 ~CPDF_IndirectObjects(); |
605 | 605 |
606 CPDF_Object* GetIndirectObject(FX_DWORD objnum, | 606 CPDF_Object* GetIndirectObject(FX_DWORD objnum, |
607 struct PARSE_CONTEXT* pContext = NULL); | 607 struct PARSE_CONTEXT* pContext = NULL); |
608 | 608 |
609 int GetIndirectType(FX_DWORD objnum); | 609 int GetIndirectType(FX_DWORD objnum); |
610 | 610 |
611 FX_DWORD AddIndirectObject(CPDF_Object* pObj); | 611 FX_DWORD AddIndirectObject(CPDF_Object* pObj); |
612 | 612 |
613 void ReleaseIndirectObject(FX_DWORD objnum); | 613 void ReleaseIndirectObject(FX_DWORD objnum); |
614 | 614 // Takes ownership of |pObj|. |
615 void InsertIndirectObject(FX_DWORD objnum, CPDF_Object* pObj); | 615 FX_BOOL InsertIndirectObject(FX_DWORD objnum, CPDF_Object* pObj); |
616 | 616 |
617 FX_DWORD GetLastObjNum() const; | 617 FX_DWORD GetLastObjNum() const; |
618 | 618 |
619 FX_POSITION GetStartPosition() const { | 619 FX_POSITION GetStartPosition() const { |
620 return m_IndirectObjs.GetStartPosition(); | 620 return m_IndirectObjs.GetStartPosition(); |
621 } | 621 } |
622 | 622 |
623 void GetNextAssoc(FX_POSITION& rPos, | 623 void GetNextAssoc(FX_POSITION& rPos, |
624 FX_DWORD& objnum, | 624 FX_DWORD& objnum, |
625 CPDF_Object*& pObject) const { | 625 CPDF_Object*& pObject) const { |
626 m_IndirectObjs.GetNextAssoc(rPos, (void*&)objnum, (void*&)pObject); | 626 m_IndirectObjs.GetNextAssoc(rPos, (void*&)objnum, (void*&)pObject); |
627 } | 627 } |
628 | 628 |
629 protected: | 629 protected: |
630 CFX_MapPtrToPtr m_IndirectObjs; | 630 CFX_MapPtrToPtr m_IndirectObjs; |
631 | 631 |
632 CPDF_Parser* m_pParser; | 632 CPDF_Parser* m_pParser; |
633 | 633 |
634 FX_DWORD m_LastObjNum; | 634 FX_DWORD m_LastObjNum; |
635 }; | 635 }; |
636 | 636 |
637 #endif // CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ | 637 #endif // CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ |
OLD | NEW |