| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfThreadDictionary | 1 #ifndef __DEFINED__SkPdfThreadDictionary |
| 2 #define __DEFINED__SkPdfThreadDictionary | 2 #define __DEFINED__SkPdfThreadDictionary |
| 3 | 3 |
| 4 #include "SkPdfEnums_autogen.h" | 4 #include "SkPdfEnums_autogen.h" |
| 5 #include "SkPdfArray_autogen.h" | 5 #include "SkPdfArray_autogen.h" |
| 6 #include "SkPdfDictionary_autogen.h" | 6 #include "SkPdfDictionary_autogen.h" |
| 7 | 7 |
| 8 // Entries in a thread dictionary |
| 8 class SkPdfThreadDictionary : public SkPdfDictionary { | 9 class SkPdfThreadDictionary : public SkPdfDictionary { |
| 9 public: | 10 public: |
| 10 virtual SkPdfObjectType getType() const { return kThreadDictionary_SkPdfObject
Type;} | 11 virtual SkPdfObjectType getType() const { return kThreadDictionary_SkPdfObject
Type;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kThreadD
ictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kThreadD
ictionary_SkPdfObjectType + 1);} |
| 12 public: | 13 public: |
| 13 virtual SkPdfThreadDictionary* asThreadDictionary() {return this;} | 14 virtual SkPdfThreadDictionary* asThreadDictionary() {return this;} |
| 14 virtual const SkPdfThreadDictionary* asThreadDictionary() const {return this;} | 15 virtual const SkPdfThreadDictionary* asThreadDictionary() const {return this;} |
| 15 | 16 |
| 16 private: | 17 private: |
| 17 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} | 18 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return
NULL;} |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 | 515 |
| 515 public: | 516 public: |
| 516 private: | 517 private: |
| 517 public: | 518 public: |
| 518 SkPdfThreadDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject*
podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfThreadDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject*
podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
| 519 | 520 |
| 520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
| 521 | 522 |
| 522 SkPdfThreadDictionary& operator=(const SkPdfThreadDictionary& from) {this->fPo
dofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} | 523 SkPdfThreadDictionary& operator=(const SkPdfThreadDictionary& from) {this->fPo
dofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} |
| 523 | 524 |
| 525 /** (Optional) The type of PDF object that this dictionary describes; if present
, must be |
| 526 * Thread for a thread dictionary. |
| 527 **/ |
| 528 bool has_Type() const { |
| 529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); |
| 530 } |
| 531 |
| 524 std::string Type() const { | 532 std::string Type() const { |
| 525 std::string ret; | 533 std::string ret; |
| 526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; | 534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; |
| 527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 535 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 528 return ""; | 536 return ""; |
| 529 } | 537 } |
| 530 | 538 |
| 539 /** (Required; must be an indirect reference) The first bead in the thread. |
| 540 **/ |
| 541 bool has_F() const { |
| 542 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "
", NULL)); |
| 543 } |
| 544 |
| 531 SkPdfDictionary* F() const { | 545 SkPdfDictionary* F() const { |
| 532 SkPdfDictionary* ret; | 546 SkPdfDictionary* ret; |
| 533 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "
", &ret)) return ret; | 547 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "
", &ret)) return ret; |
| 534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 535 return NULL; | 549 return NULL; |
| 536 } | 550 } |
| 537 | 551 |
| 552 /** (Optional) A thread information dictionary containing information about the |
| 553 * thread, such as its title, author, and creation date. The contents of this d
ictionary are |
| 554 * similar to those of the document information dictionary (see Section 9.2.1,
"Docu- |
| 555 * ment Information Dictionary"). |
| 556 **/ |
| 557 bool has_I() const { |
| 558 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "
", NULL)); |
| 559 } |
| 560 |
| 538 SkPdfDictionary* I() const { | 561 SkPdfDictionary* I() const { |
| 539 SkPdfDictionary* ret; | 562 SkPdfDictionary* ret; |
| 540 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "
", &ret)) return ret; | 563 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "I", "
", &ret)) return ret; |
| 541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 564 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 542 return NULL; | 565 return NULL; |
| 543 } | 566 } |
| 544 | 567 |
| 545 }; | 568 }; |
| 546 | 569 |
| 547 #endif // __DEFINED__SkPdfThreadDictionary | 570 #endif // __DEFINED__SkPdfThreadDictionary |
| OLD | NEW |