| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfPageTreeNodeDictionary | 1 #ifndef __DEFINED__SkPdfPageTreeNodeDictionary |
| 2 #define __DEFINED__SkPdfPageTreeNodeDictionary | 2 #define __DEFINED__SkPdfPageTreeNodeDictionary |
| 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 // Required entries in a page tree node |
| 8 class SkPdfPageTreeNodeDictionary : public SkPdfDictionary { | 9 class SkPdfPageTreeNodeDictionary : public SkPdfDictionary { |
| 9 public: | 10 public: |
| 10 virtual SkPdfObjectType getType() const { return kPageTreeNodeDictionary_SkPdf
ObjectType;} | 11 virtual SkPdfObjectType getType() const { return kPageTreeNodeDictionary_SkPdf
ObjectType;} |
| 11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kPageTre
eNodeDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kPageTre
eNodeDictionary_SkPdfObjectType + 1);} |
| 12 public: | 13 public: |
| 13 virtual SkPdfPageTreeNodeDictionary* asPageTreeNodeDictionary() {return this;} | 14 virtual SkPdfPageTreeNodeDictionary* asPageTreeNodeDictionary() {return this;} |
| 14 virtual const SkPdfPageTreeNodeDictionary* asPageTreeNodeDictionary() const {r
eturn this;} | 15 virtual const SkPdfPageTreeNodeDictionary* asPageTreeNodeDictionary() const {r
eturn 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 SkPdfPageTreeNodeDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfO
bject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfPageTreeNodeDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfO
bject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
| 519 | 520 |
| 520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
| 521 | 522 |
| 522 SkPdfPageTreeNodeDictionary& operator=(const SkPdfPageTreeNodeDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} | 523 SkPdfPageTreeNodeDictionary& operator=(const SkPdfPageTreeNodeDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} |
| 523 | 524 |
| 525 /** (Required) The type of PDF object that this dictionary describes; must be Pa
ges for |
| 526 * a page tree node. |
| 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 except in root node; must be an indirect reference) The page tree
node that |
| 540 * is the immediate parent of this one. |
| 541 **/ |
| 542 bool has_Parent() const { |
| 543 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren
t", "", NULL)); |
| 544 } |
| 545 |
| 531 SkPdfDictionary* Parent() const { | 546 SkPdfDictionary* Parent() const { |
| 532 SkPdfDictionary* ret; | 547 SkPdfDictionary* ret; |
| 533 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren
t", "", &ret)) return ret; | 548 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren
t", "", &ret)) return ret; |
| 534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 549 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 535 return NULL; | 550 return NULL; |
| 536 } | 551 } |
| 537 | 552 |
| 553 /** (Required) An array of indirect references to the immediate children of this
node. |
| 554 * The children may be page objects or other page tree nodes. |
| 555 **/ |
| 556 bool has_Kids() const { |
| 557 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids"
, "", NULL)); |
| 558 } |
| 559 |
| 538 SkPdfArray Kids() const { | 560 SkPdfArray Kids() const { |
| 539 SkPdfArray ret; | 561 SkPdfArray ret; |
| 540 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "",
&ret)) return ret; | 562 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "",
&ret)) return ret; |
| 541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 563 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 542 return SkPdfArray(); | 564 return SkPdfArray(); |
| 543 } | 565 } |
| 544 | 566 |
| 567 /** (Required) The number of leaf nodes (page objects) that are descendants of t
his |
| 568 * node within the page tree. |
| 569 **/ |
| 570 bool has_Count() const { |
| 571 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count
", "", NULL)); |
| 572 } |
| 573 |
| 545 long Count() const { | 574 long Count() const { |
| 546 long ret; | 575 long ret; |
| 547 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count", "",
&ret)) return ret; | 576 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count", "",
&ret)) return ret; |
| 548 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 577 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
| 549 return 0; | 578 return 0; |
| 550 } | 579 } |
| 551 | 580 |
| 552 }; | 581 }; |
| 553 | 582 |
| 554 #endif // __DEFINED__SkPdfPageTreeNodeDictionary | 583 #endif // __DEFINED__SkPdfPageTreeNodeDictionary |
| OLD | NEW |