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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 CFX_AffineMatrix GetMatrix(const CFX_ByteStringC& key) const; | 403 CFX_AffineMatrix GetMatrix(const CFX_ByteStringC& key) const; |
404 | 404 |
405 FX_FLOAT GetFloat(const CFX_ByteStringC& key) const { return GetNumber(key); } | 405 FX_FLOAT GetFloat(const CFX_ByteStringC& key) const { return GetNumber(key); } |
406 | 406 |
407 FX_BOOL KeyExist(const CFX_ByteStringC& key) const; | 407 FX_BOOL KeyExist(const CFX_ByteStringC& key) const; |
408 | 408 |
409 FX_POSITION GetStartPos() const; | 409 FX_POSITION GetStartPos() const; |
410 | 410 |
411 CPDF_Object* GetNextElement(FX_POSITION& pos, CFX_ByteString& key) const; | 411 CPDF_Object* GetNextElement(FX_POSITION& pos, CFX_ByteString& key) const; |
412 | 412 |
413 void SetAt(const CFX_ByteStringC& key, | 413 void SetAt(const CFX_ByteStringC& key, CPDF_Object* pObj); |
414 CPDF_Object* pObj, | |
415 CPDF_IndirectObjects* pObjs = NULL); | |
416 | 414 |
417 void SetAtName(const CFX_ByteStringC& key, const CFX_ByteString& name); | 415 void SetAtName(const CFX_ByteStringC& key, const CFX_ByteString& name); |
418 | 416 |
419 void SetAtString(const CFX_ByteStringC& key, const CFX_ByteString& string); | 417 void SetAtString(const CFX_ByteStringC& key, const CFX_ByteString& string); |
420 | 418 |
421 void SetAtInteger(const CFX_ByteStringC& key, int i); | 419 void SetAtInteger(const CFX_ByteStringC& key, int i); |
422 | 420 |
423 void SetAtNumber(const CFX_ByteStringC& key, FX_FLOAT f); | 421 void SetAtNumber(const CFX_ByteStringC& key, FX_FLOAT f); |
424 | 422 |
425 void SetAtReference(const CFX_ByteStringC& key, | 423 void SetAtReference(const CFX_ByteStringC& key, |
426 CPDF_IndirectObjects* pDoc, | 424 CPDF_IndirectObjects* pDoc, |
427 FX_DWORD objnum); | 425 FX_DWORD objnum); |
428 | 426 |
429 void SetAtReference(const CFX_ByteStringC& key, | 427 void SetAtReference(const CFX_ByteStringC& key, |
430 CPDF_IndirectObjects* pDoc, | 428 CPDF_IndirectObjects* pDoc, |
431 CPDF_Object* obj) { | 429 CPDF_Object* obj) { |
432 SetAtReference(key, pDoc, obj->GetObjNum()); | 430 SetAtReference(key, pDoc, obj->GetObjNum()); |
433 } | 431 } |
434 | 432 |
435 void AddReference(const CFX_ByteStringC& key, | 433 void AddReference(const CFX_ByteStringC& key, |
436 CPDF_IndirectObjects* pDoc, | 434 CPDF_IndirectObjects* pDoc, |
437 FX_DWORD objnum); | 435 FX_DWORD objnum); |
438 | 436 |
439 void AddReference(const CFX_ByteStringC& key, | |
440 CPDF_IndirectObjects* pDoc, | |
441 CPDF_Object* obj) { | |
442 AddReference(key, pDoc, obj->GetObjNum()); | |
443 } | |
444 | |
445 void SetAtRect(const CFX_ByteStringC& key, const CFX_FloatRect& rect); | 437 void SetAtRect(const CFX_ByteStringC& key, const CFX_FloatRect& rect); |
446 | 438 |
447 void SetAtMatrix(const CFX_ByteStringC& key, const CFX_AffineMatrix& matrix); | 439 void SetAtMatrix(const CFX_ByteStringC& key, const CFX_AffineMatrix& matrix); |
448 | 440 |
449 void SetAtBoolean(const CFX_ByteStringC& key, FX_BOOL bValue); | 441 void SetAtBoolean(const CFX_ByteStringC& key, FX_BOOL bValue); |
450 | 442 |
451 void RemoveAt(const CFX_ByteStringC& key); | 443 void RemoveAt(const CFX_ByteStringC& key); |
452 | 444 |
453 void ReplaceKey(const CFX_ByteStringC& oldkey, const CFX_ByteStringC& newkey); | 445 void ReplaceKey(const CFX_ByteStringC& oldkey, const CFX_ByteStringC& newkey); |
454 | 446 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 | 634 |
643 protected: | 635 protected: |
644 CFX_MapPtrToPtr m_IndirectObjs; | 636 CFX_MapPtrToPtr m_IndirectObjs; |
645 | 637 |
646 CPDF_Parser* m_pParser; | 638 CPDF_Parser* m_pParser; |
647 | 639 |
648 FX_DWORD m_LastObjNum; | 640 FX_DWORD m_LastObjNum; |
649 }; | 641 }; |
650 | 642 |
651 #endif // CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ | 643 #endif // CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ |
OLD | NEW |