OLD | NEW |
1 #ifndef __DEFINED__SkPdfURLAliasDictionary | 1 #ifndef __DEFINED__SkPdfURLAliasDictionary |
2 #define __DEFINED__SkPdfURLAliasDictionary | 2 #define __DEFINED__SkPdfURLAliasDictionary |
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 URL alias dictionary |
8 class SkPdfURLAliasDictionary : public SkPdfDictionary { | 9 class SkPdfURLAliasDictionary : public SkPdfDictionary { |
9 public: | 10 public: |
10 virtual SkPdfObjectType getType() const { return kURLAliasDictionary_SkPdfObje
ctType;} | 11 virtual SkPdfObjectType getType() const { return kURLAliasDictionary_SkPdfObje
ctType;} |
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kURLAlia
sDictionary_SkPdfObjectType + 1);} | 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kURLAlia
sDictionary_SkPdfObjectType + 1);} |
12 public: | 13 public: |
13 virtual SkPdfURLAliasDictionary* asURLAliasDictionary() {return this;} | 14 virtual SkPdfURLAliasDictionary* asURLAliasDictionary() {return this;} |
14 virtual const SkPdfURLAliasDictionary* asURLAliasDictionary() const {return th
is;} | 15 virtual const SkPdfURLAliasDictionary* asURLAliasDictionary() const {return th
is;} |
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 SkPdfURLAliasDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObjec
t* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} | 519 SkPdfURLAliasDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObjec
t* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} |
519 | 520 |
520 virtual bool valid() const {return true;} | 521 virtual bool valid() const {return true;} |
521 | 522 |
522 SkPdfURLAliasDictionary& operator=(const SkPdfURLAliasDictionary& from) {this-
>fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;
} | 523 SkPdfURLAliasDictionary& operator=(const SkPdfURLAliasDictionary& from) {this-
>fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;
} |
523 | 524 |
| 525 /** (Required) The destination URL to which all of the chains specified by the C
entry lead. |
| 526 **/ |
| 527 bool has_U() const { |
| 528 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "U", "
", NULL)); |
| 529 } |
| 530 |
524 std::string U() const { | 531 std::string U() const { |
525 std::string ret; | 532 std::string ret; |
526 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "U", "", &
ret)) return ret; | 533 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "U", "", &
ret)) return ret; |
527 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | 534 // TODO(edisonn): warn about missing required field, assert for known good p
dfs |
528 return ""; | 535 return ""; |
529 } | 536 } |
530 | 537 |
| 538 /** (Optional) An array of one or more arrays of strings, each representing a ch
ain of URLs |
| 539 * leading to the common destination specified by U. |
| 540 **/ |
| 541 bool has_C() const { |
| 542 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "
", NULL)); |
| 543 } |
| 544 |
531 SkPdfArray C() const { | 545 SkPdfArray C() const { |
532 SkPdfArray ret; | 546 SkPdfArray ret; |
533 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &r
et)) return ret; | 547 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", "", &r
et)) 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 SkPdfArray(); | 549 return SkPdfArray(); |
536 } | 550 } |
537 | 551 |
538 }; | 552 }; |
539 | 553 |
540 #endif // __DEFINED__SkPdfURLAliasDictionary | 554 #endif // __DEFINED__SkPdfURLAliasDictionary |
OLD | NEW |