OLD | NEW |
1 #ifndef __DEFINED__SkPdfNameTreeNodeDictionary | 1 #ifndef __DEFINED__SkPdfNameTreeNodeDictionary |
2 #define __DEFINED__SkPdfNameTreeNodeDictionary | 2 #define __DEFINED__SkPdfNameTreeNodeDictionary |
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 name tree node dictionary |
8 class SkPdfNameTreeNodeDictionary : public SkPdfDictionary { | 9 class SkPdfNameTreeNodeDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kNameTreeNodeDictionary_SkPdf
ObjectType;} | 11 virtual SkPdfObjectType getType() const { return kNameTreeNodeDictionary_SkPdf
ObjectType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kNameTre
eNodeDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kNameTre
eNodeDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfNameTreeNodeDictionary* asNameTreeNodeDictionary() {return this;} | 14 virtual SkPdfNameTreeNodeDictionary* asNameTreeNodeDictionary() {return this;} |
14 virtual const SkPdfNameTreeNodeDictionary* asNameTreeNodeDictionary() const {r
eturn this;} | 15 virtual const SkPdfNameTreeNodeDictionary* asNameTreeNodeDictionary() 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 SkPdfNameTreeNodeDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfO
bject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfNameTreeNodeDictionary(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 SkPdfNameTreeNodeDictionary& operator=(const SkPdfNameTreeNodeDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} | 523 SkPdfNameTreeNodeDictionary& operator=(const SkPdfNameTreeNodeDictionary& from
) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; retur
n *this;} |
523 | 524 |
| 525 /** (Root and intermediate nodes only; required in intermediate nodes; present i
n the root node |
| 526 * if and only if Names is not present) An array of indirect references to the
immediate chil- |
| 527 * dren of this node. The children may be intermediate or leaf nodes. |
| 528 **/ |
| 529 bool has_Kids() const { |
| 530 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids"
, "", NULL)); |
| 531 } |
| 532 |
524 SkPdfArray Kids() const { | 533 SkPdfArray Kids() const { |
525 SkPdfArray ret; | 534 SkPdfArray ret; |
526 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "",
&ret)) return ret; | 535 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Kids", "",
&ret)) return ret; |
527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 536 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
528 return SkPdfArray(); | 537 return SkPdfArray(); |
529 } | 538 } |
530 | 539 |
| 540 /** (Root and leaf nodes only; required in leaf nodes; present in the root node
if and only if Kids |
| 541 * is not present) An array of the form |
| 542 * [key1 value1 key2 value2 ... keyn valuen ] |
| 543 * where each keyi is a string and the corresponding valuei is an indirect refe
rence to the |
| 544 * object associated with that key. The keys are sorted in lexical order, as de
scribed below. |
| 545 **/ |
| 546 bool has_Names() const { |
| 547 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Names
", "", NULL)); |
| 548 } |
| 549 |
531 SkPdfArray Names() const { | 550 SkPdfArray Names() const { |
532 SkPdfArray ret; | 551 SkPdfArray ret; |
533 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Names", ""
, &ret)) return ret; | 552 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Names", ""
, &ret)) return ret; |
534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 553 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
535 return SkPdfArray(); | 554 return SkPdfArray(); |
536 } | 555 } |
537 | 556 |
| 557 /** (Intermediate and leaf nodes only; required) An array of two strings, specif
ying the (lexi- |
| 558 * cally) least and greatest keys included in the Names array of a leaf node or
in the Names |
| 559 * arrays of any leaf nodes that are descendants of an intermediate node. |
| 560 **/ |
| 561 bool has_Limits() const { |
| 562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Limit
s", "", NULL)); |
| 563 } |
| 564 |
538 SkPdfArray Limits() const { | 565 SkPdfArray Limits() const { |
539 SkPdfArray ret; | 566 SkPdfArray ret; |
540 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Limits", "
", &ret)) return ret; | 567 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Limits", "
", &ret)) return ret; |
541 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 568 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
542 return SkPdfArray(); | 569 return SkPdfArray(); |
543 } | 570 } |
544 | 571 |
545 }; | 572 }; |
546 | 573 |
547 #endif // __DEFINED__SkPdfNameTreeNodeDictionary | 574 #endif // __DEFINED__SkPdfNameTreeNodeDictionary |
OLD | NEW |