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

Unified Diff: core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h

Issue 2275593002: IndirectObjectHolder API updates (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Missed one Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_reference.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h b/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h
index c29746fdd79d8d4554713686fc00e69d0ed61a13..31e0aba5ea15852065e962c1bffcbec01324fd76 100644
--- a/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h
+++ b/core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h
@@ -22,14 +22,17 @@ class CPDF_IndirectObjectHolder {
explicit CPDF_IndirectObjectHolder(CPDF_Parser* pParser);
~CPDF_IndirectObjectHolder();
- CPDF_Object* GetIndirectObject(uint32_t objnum);
- uint32_t AddIndirectObject(CPDF_Object* pObj);
+ CPDF_Object* GetOrParseIndirectObject(uint32_t objnum);
void ReleaseIndirectObject(uint32_t objnum);
- // Takes ownership of |pObj|.
- bool InsertIndirectObject(uint32_t objnum, CPDF_Object* pObj);
+ // Take ownership of |pObj|.
+ uint32_t AddIndirectObject(CPDF_Object* pObj);
+ bool ReplaceIndirectObjectIfHigherGeneration(uint32_t objnum,
+ CPDF_Object* pObj);
uint32_t GetLastObjNum() const { return m_LastObjNum; }
+ void SetLastObjNum(uint32_t objnum) { m_LastObjNum = objnum; }
+
iterator begin() { return m_IndirectObjs.begin(); }
const_iterator begin() const { return m_IndirectObjs.begin(); }
iterator end() { return m_IndirectObjs.end(); }
@@ -37,8 +40,10 @@ class CPDF_IndirectObjectHolder {
protected:
CPDF_Parser* m_pParser;
- uint32_t m_LastObjNum;
std::map<uint32_t, CPDF_Object*> m_IndirectObjs;
+
+ private:
+ uint32_t m_LastObjNum;
};
#endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_INDIRECT_OBJECT_HOLDER_H_
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_reference.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698