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

Side by Side Diff: experimental/PdfViewer/autogen/SkPdfFileSpecificationDictionary_autogen.h

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

Powered by Google App Engine
This is Rietveld 408576698