| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfPageTreeNodeDictionary | 1 #ifndef __DEFINED__SkPdfPageTreeNodeDictionary |
| 2 #define __DEFINED__SkPdfPageTreeNodeDictionary | 2 #define __DEFINED__SkPdfPageTreeNodeDictionary |
| 3 | 3 |
| 4 #include "SkPdfUtils.h" | 4 #include "SkPdfUtils.h" |
| 5 #include "SkPdfEnums_autogen.h" | 5 #include "SkPdfEnums_autogen.h" |
| 6 #include "SkPdfArray_autogen.h" | 6 #include "SkPdfArray_autogen.h" |
| 7 #include "SkPdfDictionary_autogen.h" | 7 #include "SkPdfDictionary_autogen.h" |
| 8 | 8 |
| 9 // Required entries in a page tree node | 9 // Required entries in a page tree node |
| 10 class SkPdfPageTreeNodeDictionary : public SkPdfDictionary { | 10 class SkPdfPageTreeNodeDictionary : public SkPdfDictionary { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 SkPdfPageTreeNodeDictionary& operator=(const SkPdfPageTreeNodeDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} | 526 SkPdfPageTreeNodeDictionary& operator=(const SkPdfPageTreeNodeDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} |
| 527 | 527 |
| 528 /** (Required) The type of PDF object that this dictionary describes; must be Pa
ges for | 528 /** (Required) The type of PDF object that this dictionary describes; must be Pa
ges for |
| 529 * a page tree node. | 529 * a page tree node. |
| 530 **/ | 530 **/ |
| 531 bool has_Type() const { | 531 bool has_Type() const { |
| 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type"
, "", NULL)); |
| 533 } | 533 } |
| 534 | 534 |
| 535 std::string Type() const { | 535 std::string Type() const; |
| 536 std::string ret; | |
| 537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Type", "",
&ret)) return ret; | |
| 538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 539 return ""; | |
| 540 } | |
| 541 | |
| 542 /** (Required except in root node; must be an indirect reference) The page tree
node that | 536 /** (Required except in root node; must be an indirect reference) The page tree
node that |
| 543 * is the immediate parent of this one. | 537 * is the immediate parent of this one. |
| 544 **/ | 538 **/ |
| 545 bool has_Parent() const { | 539 bool has_Parent() const { |
| 546 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren
t", "", NULL)); | 540 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren
t", "", NULL)); |
| 547 } | 541 } |
| 548 | 542 |
| 549 SkPdfDictionary* Parent() const { | 543 SkPdfDictionary* Parent() const; |
| 550 SkPdfDictionary* ret; | |
| 551 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Paren
t", "", &ret)) return ret; | |
| 552 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 553 return NULL; | |
| 554 } | |
| 555 | |
| 556 /** (Required) An array of indirect references to the immediate children of this
node. | 544 /** (Required) An array of indirect references to the immediate children of this
node. |
| 557 * The children may be page objects or other page tree nodes. | 545 * The children may be page objects or other page tree nodes. |
| 558 **/ | 546 **/ |
| 559 bool has_Kids() const { | 547 bool has_Kids() const { |
| 560 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids"
, "", NULL)); | 548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids"
, "", NULL)); |
| 561 } | 549 } |
| 562 | 550 |
| 563 SkPdfArray* Kids() const { | 551 SkPdfArray* Kids() const; |
| 564 SkPdfArray* ret; | |
| 565 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "",
&ret)) return ret; | |
| 566 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 567 return NULL; | |
| 568 } | |
| 569 | |
| 570 /** (Required) The number of leaf nodes (page objects) that are descendants of t
his | 552 /** (Required) The number of leaf nodes (page objects) that are descendants of t
his |
| 571 * node within the page tree. | 553 * node within the page tree. |
| 572 **/ | 554 **/ |
| 573 bool has_Count() const { | 555 bool has_Count() const { |
| 574 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count
", "", NULL)); | 556 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count
", "", NULL)); |
| 575 } | 557 } |
| 576 | 558 |
| 577 long Count() const { | 559 long Count() const; |
| 578 long ret; | |
| 579 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Count", "",
&ret)) return ret; | |
| 580 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 581 return 0; | |
| 582 } | |
| 583 | |
| 584 }; | 560 }; |
| 585 | 561 |
| 586 #endif // __DEFINED__SkPdfPageTreeNodeDictionary | 562 #endif // __DEFINED__SkPdfPageTreeNodeDictionary |
| OLD | NEW |