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 "../fxcrt/fx_coordinates.h" | 10 #include "../fxcrt/fx_coordinates.h" |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
399 CFX_AffineMatrix GetMatrix(const CFX_ByteStringC& key) const; | 399 CFX_AffineMatrix GetMatrix(const CFX_ByteStringC& key) const; |
400 | 400 |
401 FX_FLOAT GetFloat(const CFX_ByteStringC& key) const { return GetNumber(key); } | 401 FX_FLOAT GetFloat(const CFX_ByteStringC& key) const { return GetNumber(key); } |
402 | 402 |
403 FX_BOOL KeyExist(const CFX_ByteStringC& key) const; | 403 FX_BOOL KeyExist(const CFX_ByteStringC& key) const; |
404 | 404 |
405 FX_POSITION GetStartPos() const; | 405 FX_POSITION GetStartPos() const; |
406 | 406 |
407 CPDF_Object* GetNextElement(FX_POSITION& pos, CFX_ByteString& key) const; | 407 CPDF_Object* GetNextElement(FX_POSITION& pos, CFX_ByteString& key) const; |
408 | 408 |
409 void SetAt(const CFX_ByteStringC& key, | 409 void SetAt(const CFX_ByteStringC& key, CPDF_Object* pObj); |
Tom Sepez
2015/10/24 16:50:01
rant: this should be the only form of these; the o
Lei Zhang
2015/10/26 21:58:22
Right. The caller can check if it's a reference an
| |
410 CPDF_Object* pObj, | 410 |
411 CPDF_IndirectObjects* pObjs = NULL); | 411 void SetAtWithIndirect(const CFX_ByteStringC& key, |
412 CPDF_Object* pObj, | |
413 CPDF_IndirectObjects* pObjs); | |
412 | 414 |
413 void SetAtName(const CFX_ByteStringC& key, const CFX_ByteString& name); | 415 void SetAtName(const CFX_ByteStringC& key, const CFX_ByteString& name); |
414 | 416 |
415 void SetAtString(const CFX_ByteStringC& key, const CFX_ByteString& string); | 417 void SetAtString(const CFX_ByteStringC& key, const CFX_ByteString& string); |
416 | 418 |
417 void SetAtInteger(const CFX_ByteStringC& key, int i); | 419 void SetAtInteger(const CFX_ByteStringC& key, int i); |
418 | 420 |
419 void SetAtNumber(const CFX_ByteStringC& key, FX_FLOAT f); | 421 void SetAtNumber(const CFX_ByteStringC& key, FX_FLOAT f); |
420 | 422 |
421 void SetAtReference(const CFX_ByteStringC& key, | 423 void SetAtReference(const CFX_ByteStringC& key, |
422 CPDF_IndirectObjects* pDoc, | 424 CPDF_IndirectObjects* pDoc, |
423 FX_DWORD objnum); | 425 FX_DWORD objnum); |
424 | 426 |
425 void SetAtReference(const CFX_ByteStringC& key, | 427 void SetAtReference(const CFX_ByteStringC& key, |
426 CPDF_IndirectObjects* pDoc, | 428 CPDF_IndirectObjects* pDoc, |
427 CPDF_Object* obj) { | 429 CPDF_Object* obj) { |
428 SetAtReference(key, pDoc, obj->GetObjNum()); | 430 SetAtReference(key, pDoc, obj->GetObjNum()); |
429 } | 431 } |
430 | 432 |
431 void AddReference(const CFX_ByteStringC& key, | 433 void AddReference(const CFX_ByteStringC& key, |
432 CPDF_IndirectObjects* pDoc, | 434 CPDF_IndirectObjects* pDoc, |
433 FX_DWORD objnum); | 435 FX_DWORD objnum); |
434 | 436 |
435 void AddReference(const CFX_ByteStringC& key, | |
436 CPDF_IndirectObjects* pDoc, | |
437 CPDF_Object* obj) { | |
438 AddReference(key, pDoc, obj->GetObjNum()); | |
439 } | |
440 | |
441 void SetAtRect(const CFX_ByteStringC& key, const CFX_FloatRect& rect); | 437 void SetAtRect(const CFX_ByteStringC& key, const CFX_FloatRect& rect); |
442 | 438 |
443 void SetAtMatrix(const CFX_ByteStringC& key, const CFX_AffineMatrix& matrix); | 439 void SetAtMatrix(const CFX_ByteStringC& key, const CFX_AffineMatrix& matrix); |
444 | 440 |
445 void SetAtBoolean(const CFX_ByteStringC& key, FX_BOOL bValue); | 441 void SetAtBoolean(const CFX_ByteStringC& key, FX_BOOL bValue); |
446 | 442 |
447 void RemoveAt(const CFX_ByteStringC& key); | 443 void RemoveAt(const CFX_ByteStringC& key); |
448 | 444 |
449 void ReplaceKey(const CFX_ByteStringC& oldkey, const CFX_ByteStringC& newkey); | 445 void ReplaceKey(const CFX_ByteStringC& oldkey, const CFX_ByteStringC& newkey); |
450 | 446 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
631 | 627 |
632 protected: | 628 protected: |
633 CFX_MapPtrToPtr m_IndirectObjs; | 629 CFX_MapPtrToPtr m_IndirectObjs; |
634 | 630 |
635 CPDF_Parser* m_pParser; | 631 CPDF_Parser* m_pParser; |
636 | 632 |
637 FX_DWORD m_LastObjNum; | 633 FX_DWORD m_LastObjNum; |
638 }; | 634 }; |
639 | 635 |
640 #endif // CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ | 636 #endif // CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ |
OLD | NEW |