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

Side by Side Diff: experimental/PdfViewer/SkPdfFileSpecificationDictionary_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__SkPdfFileSpecificationDictionary 1 #ifndef __DEFINED__SkPdfFileSpecificationDictionary
2 #define __DEFINED__SkPdfFileSpecificationDictionary 2 #define __DEFINED__SkPdfFileSpecificationDictionary
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 file specification dictionary
8 class SkPdfFileSpecificationDictionary : public SkPdfDictionary { 9 class SkPdfFileSpecificationDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kFileSpecificationDictionary_ SkPdfObjectType;} 11 virtual SkPdfObjectType getType() const { return kFileSpecificationDictionary_ SkPdfObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFileSpe cificationDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kFileSpe cificationDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfFileSpecificationDictionary* asFileSpecificationDictionary() {ret urn this;} 14 virtual SkPdfFileSpecificationDictionary* asFileSpecificationDictionary() {ret urn this;}
14 virtual const SkPdfFileSpecificationDictionary* asFileSpecificationDictionary( ) const {return this;} 15 virtual const SkPdfFileSpecificationDictionary* asFileSpecificationDictionary( ) const {return 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 SkPdfFileSpecificationDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfFileSpecificationDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfFileSpecificationDictionary& operator=(const SkPdfFileSpecificationDictio nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo Obj; return *this;} 523 SkPdfFileSpecificationDictionary& operator=(const SkPdfFileSpecificationDictio nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo Obj; return *this;}
523 524
525 /** (Required if an EF or RF entry is present; recommended always) The type of P DF object
526 * that this dictionary describes; must be Filespec for a file specification di ctionary.
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 /** (Optional) The name of the file system to be used to interpret this file spe cification. If
540 * this entry is present, all other entries in the dictionary are interpreted b y the desig-
541 * nated file system. PDF defines only one standard file system, URL (see Secti on 3.10.4,
542 * "URL Specifications"); a viewer application or plug-in extension can registe r a differ-
543 * ent one (see Appendix E). Note that this entry is independent of the F, DOS, Mac, and
544 * Unix entries.
545 **/
546 bool has_FS() const {
547 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FS", "", NULL));
548 }
549
531 std::string FS() const { 550 std::string FS() const {
532 std::string ret; 551 std::string ret;
533 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FS", "", &r et)) return ret; 552 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "FS", "", &r et)) 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 ""; 554 return "";
536 } 555 }
537 556
557 /** (Required if the DOS, Mac, and Unix entries are all absent) A file specifica tion string of
558 * the form described in Section 3.10.1, "File Specification Strings," or (if t he file system
559 * is URL) a uniform resource locator, as described in Section 3.10.4, "URL Spe cifica-
560 * tions."
561 **/
562 bool has_F() const {
563 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", " ", NULL));
564 }
565
538 std::string F() const { 566 std::string F() const {
539 std::string ret; 567 std::string ret;
540 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", & ret)) return ret; 568 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", & ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 569 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return ""; 570 return "";
543 } 571 }
544 572
573 /** (Optional) A file specification string (see Section 3.10.1, "File Specificat ion Strings")
574 * representing a DOS file name.
575 **/
576 bool has_DOS() const {
577 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DOS", "", NULL));
578 }
579
545 std::string DOS() const { 580 std::string DOS() const {
546 std::string ret; 581 std::string ret;
547 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DOS", "", &ret)) return ret; 582 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "DOS", "", &ret)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 583 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return ""; 584 return "";
550 } 585 }
551 586
587 /** (Optional) A file specification string (see Section 3.10.1, "File Specificat ion Strings")
588 * representing a Mac OS file name.
589 **/
590 bool has_Mac() const {
591 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", NULL));
592 }
593
552 std::string Mac() const { 594 std::string Mac() const {
553 std::string ret; 595 std::string ret;
554 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", &ret)) return ret; 596 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mac", "", &ret)) return ret;
555 // TODO(edisonn): warn about missing required field, assert for known good p dfs 597 // TODO(edisonn): warn about missing required field, assert for known good p dfs
556 return ""; 598 return "";
557 } 599 }
558 600
601 /** (Optional) A file specification string (see Section 3.10.1, "File Specificat ion Strings")
602 * representing a UNIX file name.
603 **/
604 bool has_Unix() const {
605 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Unix" , "", NULL));
606 }
607
559 std::string Unix() const { 608 std::string Unix() const {
560 std::string ret; 609 std::string ret;
561 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Unix", "" , &ret)) return ret; 610 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Unix", "" , &ret)) return ret;
562 // TODO(edisonn): warn about missing required field, assert for known good p dfs 611 // TODO(edisonn): warn about missing required field, assert for known good p dfs
563 return ""; 612 return "";
564 } 613 }
565 614
615 /** (Optional) An array of two strings constituting a file identifier (see Secti on 9.3, "File
616 * Identifiers") that is also included in the referenced file. The use of this entry improves
617 * a viewer application's chances of finding the intended file and allows it to warn the
618 * user if the file has changed since the link was made.
619 **/
620 bool has_ID() const {
621 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", NULL));
622 }
623
566 SkPdfArray ID() const { 624 SkPdfArray ID() const {
567 SkPdfArray ret; 625 SkPdfArray ret;
568 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", & ret)) return ret; 626 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "ID", "", & ret)) return ret;
569 // TODO(edisonn): warn about missing required field, assert for known good p dfs 627 // TODO(edisonn): warn about missing required field, assert for known good p dfs
570 return SkPdfArray(); 628 return SkPdfArray();
571 } 629 }
572 630
631 /** (Optional; PDF 1.2) A flag indicating whether the file referenced by the fil e specifica-
632 * tion is volatile (changes frequently with time). If the value is true, viewe r applications
633 * should never cache a copy of the file. For example, a movie annotation refer encing a
634 * URL to a live video camera could set this flag to true, notifying the applic ation that it
635 * should reacquire the movie each time it is played. Default value: false.
636 **/
637 bool has_V() const {
638 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", " ", NULL));
639 }
640
573 bool V() const { 641 bool V() const {
574 bool ret; 642 bool ret;
575 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &re t)) return ret; 643 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "V", "", &re t)) return ret;
576 // TODO(edisonn): warn about missing required field, assert for known good p dfs 644 // TODO(edisonn): warn about missing required field, assert for known good p dfs
577 return false; 645 return false;
578 } 646 }
579 647
648 /** (Required if RF is present; PDF 1.3) A dictionary containing a subset of the keys F,
649 * DOS, Mac, and Unix, corresponding to the entries by those names in the file specifica-
650 * tion dictionary. The value of each such key is an embedded file stream (see Section
651 * 3.10.3, "Embedded File Streams") containing the corresponding file. If this entry is
652 * present, the Type entry is required and the file specification dictionary mu st be indi-
653 * rectly referenced.
654 **/
655 bool has_EF() const {
656 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EF", "", NULL));
657 }
658
580 SkPdfDictionary* EF() const { 659 SkPdfDictionary* EF() const {
581 SkPdfDictionary* ret; 660 SkPdfDictionary* ret;
582 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EF", "", &ret)) return ret; 661 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "EF", "", &ret)) return ret;
583 // TODO(edisonn): warn about missing required field, assert for known good p dfs 662 // TODO(edisonn): warn about missing required field, assert for known good p dfs
584 return NULL; 663 return NULL;
585 } 664 }
586 665
666 /** (Optional; PDF 1.3) A dictionary with the same structure as the EF dictionar y, which
667 * must also be present. Each key in the RF dictionary must also be present in the EF dic-
668 * tionary. Each value is a related files array (see "Related Files Arrays" on page 125)
669 * identifying files that are related to the corresponding file in the EF dicti onary. If this
670 * entry is present, the Type entry is required and the file specification dict ionary must
671 * be indirectly referenced.
672 **/
673 bool has_RF() const {
674 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RF", "", NULL));
675 }
676
587 SkPdfDictionary* RF() const { 677 SkPdfDictionary* RF() const {
588 SkPdfDictionary* ret; 678 SkPdfDictionary* ret;
589 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RF", "", &ret)) return ret; 679 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "RF", "", &ret)) return ret;
590 // TODO(edisonn): warn about missing required field, assert for known good p dfs 680 // TODO(edisonn): warn about missing required field, assert for known good p dfs
591 return NULL; 681 return NULL;
592 } 682 }
593 683
594 }; 684 };
595 685
596 #endif // __DEFINED__SkPdfFileSpecificationDictionary 686 #endif // __DEFINED__SkPdfFileSpecificationDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698