Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: experimental/PdfViewer/SkPdfWebCaptureDictionary_autogen.h

Issue 16975013: Deal with ca and CA transparency operators in pdf. add comments to generated classes. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #ifndef __DEFINED__SkPdfWebCaptureDictionary 1 #ifndef __DEFINED__SkPdfWebCaptureDictionary
2 #define __DEFINED__SkPdfWebCaptureDictionary 2 #define __DEFINED__SkPdfWebCaptureDictionary
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 common to all Web Capture content sets
8 class SkPdfWebCaptureDictionary : public SkPdfDictionary { 9 class SkPdfWebCaptureDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kWebCaptureDictionary_SkPdfOb jectType;} 11 virtual SkPdfObjectType getType() const { return kWebCaptureDictionary_SkPdfOb jectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kWebCapt ureDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kWebCapt ureDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfWebCaptureDictionary* asWebCaptureDictionary() {return this;} 14 virtual SkPdfWebCaptureDictionary* asWebCaptureDictionary() {return this;}
14 virtual const SkPdfWebCaptureDictionary* asWebCaptureDictionary() const {retur n this;} 15 virtual const SkPdfWebCaptureDictionary* asWebCaptureDictionary() const {retur n 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
514 515
515 public: 516 public:
516 private: 517 private:
517 public: 518 public:
518 SkPdfWebCaptureDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObj ect* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfWebCaptureDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObj ect* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfWebCaptureDictionary& operator=(const SkPdfWebCaptureDictionary& from) {t his->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *t his;} 523 SkPdfWebCaptureDictionary& operator=(const SkPdfWebCaptureDictionary& from) {t his->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *t his;}
523 524
525 /** (Optional) The type of PDF object that this dictionary describes; if present , must be
526 * SpiderContentSet for a Web Capture content set.
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) The subtype of content set that this dictionary describes:
540 * SPS ("Spider page set") A page set
541 * SIS ("Spider image set") An image set
542 **/
543 bool has_S() const {
544 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", " ", NULL));
545 }
546
531 std::string S() const { 547 std::string S() const {
532 std::string ret; 548 std::string ret;
533 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) return ret; 549 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 550 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return ""; 551 return "";
536 } 552 }
537 553
554 /** (Required) The digital identifier of the content set (see "Digital Identifie rs" on page
555 * 664). If the content set has been located via the URLS name tree, this allow s its related
556 * entry in the IDS name tree to be found.
557 **/
558 bool has_ID() const {
559 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", NULL));
560 }
561
538 std::string ID() const { 562 std::string ID() const {
539 std::string ret; 563 std::string ret;
540 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", &ret)) return ret; 564 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", &ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 565 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return ""; 566 return "";
543 } 567 }
544 568
569 /** (Required) An array of indirect references to the objects belonging to the c ontent set.
570 * The order of objects in the array is undefined in general, but may be restri cted by spe-
571 * cific content set subtypes.
572 **/
573 bool has_O() const {
574 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", " ", NULL));
575 }
576
545 SkPdfArray O() const { 577 SkPdfArray O() const {
546 SkPdfArray ret; 578 SkPdfArray ret;
547 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", &r et)) return ret; 579 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "O", "", &r et)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 580 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return SkPdfArray(); 581 return SkPdfArray();
550 } 582 }
551 583
584 /** (Required) A source information dictionary (see Section 9.9.4, "Source Infor mation"),
585 * or an array of such dictionaries, describing the sources from which the obje cts belong-
586 * ing to the content set were created.
587 **/
588 bool has_SI() const {
589 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "", NULL));
590 }
591
552 bool isSIADictionary() const { 592 bool isSIADictionary() const {
553 SkPdfObject* ret = NULL; 593 SkPdfObject* ret = NULL;
554 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "", &ret)) return false; 594 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "", &ret)) return false;
555 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; 595 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
556 } 596 }
557 597
558 SkPdfDictionary* getSIAsDictionary() const { 598 SkPdfDictionary* getSIAsDictionary() const {
559 SkPdfDictionary* ret = NULL; 599 SkPdfDictionary* ret = NULL;
560 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "", &ret)) return ret; 600 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "", &ret)) return ret;
561 // TODO(edisonn): warn about missing required field, assert for known good p dfs 601 // TODO(edisonn): warn about missing required field, assert for known good p dfs
562 return NULL; 602 return NULL;
563 } 603 }
564 604
565 bool isSIAArray() const { 605 bool isSIAArray() const {
566 SkPdfObject* ret = NULL; 606 SkPdfObject* ret = NULL;
567 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "", &ret)) return false; 607 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "", &ret)) return false;
568 return ret->podofo()->GetDataType() == ePdfDataType_Array; 608 return ret->podofo()->GetDataType() == ePdfDataType_Array;
569 } 609 }
570 610
571 SkPdfArray getSIAsArray() const { 611 SkPdfArray getSIAsArray() const {
572 SkPdfArray ret = SkPdfArray(); 612 SkPdfArray ret = SkPdfArray();
573 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "", & ret)) return ret; 613 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "SI", "", & ret)) return ret;
574 // TODO(edisonn): warn about missing required field, assert for known good p dfs 614 // TODO(edisonn): warn about missing required field, assert for known good p dfs
575 return SkPdfArray(); 615 return SkPdfArray();
576 } 616 }
577 617
618 /** (Optional) The content type, a string characterizing the source from which t he objects
619 * belonging to the content set were created. The string should conform to the content
620 * type specification described in Internet RFC 2045, Multipurpose Internet Mai l Exten-
621 * sions (MIME) Part One: Format of Internet Message Bodies (see the Bibliograp hy). For
622 * example, for a page set consisting of a group of PDF pages created from an H TML file,
623 * the content type would be text/html.
624 **/
625 bool has_CT() const {
626 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CT", "", NULL));
627 }
628
578 std::string CT() const { 629 std::string CT() const {
579 std::string ret; 630 std::string ret;
580 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CT", "", &ret)) return ret; 631 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "CT", "", &ret)) return ret;
581 // TODO(edisonn): warn about missing required field, assert for known good p dfs 632 // TODO(edisonn): warn about missing required field, assert for known good p dfs
582 return ""; 633 return "";
583 } 634 }
584 635
636 /** (Optional) A time stamp giving the date and time at which the content set wa s created.
637 **/
638 bool has_TS() const {
639 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS", "", NULL));
640 }
641
585 SkPdfDate TS() const { 642 SkPdfDate TS() const {
586 SkPdfDate ret; 643 SkPdfDate ret;
587 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS", "", &r et)) return ret; 644 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS", "", &r et)) return ret;
588 // TODO(edisonn): warn about missing required field, assert for known good p dfs 645 // TODO(edisonn): warn about missing required field, assert for known good p dfs
589 return SkPdfDate(); 646 return SkPdfDate();
590 } 647 }
591 648
592 }; 649 };
593 650
594 #endif // __DEFINED__SkPdfWebCaptureDictionary 651 #endif // __DEFINED__SkPdfWebCaptureDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698