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

Side by Side Diff: experimental/PdfViewer/SkPdfSourceInformationDictionary_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__SkPdfSourceInformationDictionary 1 #ifndef __DEFINED__SkPdfSourceInformationDictionary
2 #define __DEFINED__SkPdfSourceInformationDictionary 2 #define __DEFINED__SkPdfSourceInformationDictionary
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 source information dictionary
8 class SkPdfSourceInformationDictionary : public SkPdfDictionary { 9 class SkPdfSourceInformationDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kSourceInformationDictionary_ SkPdfObjectType;} 11 virtual SkPdfObjectType getType() const { return kSourceInformationDictionary_ SkPdfObjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kSourceI nformationDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kSourceI nformationDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfSourceInformationDictionary* asSourceInformationDictionary() {ret urn this;} 14 virtual SkPdfSourceInformationDictionary* asSourceInformationDictionary() {ret urn this;}
14 virtual const SkPdfSourceInformationDictionary* asSourceInformationDictionary( ) const {return this;} 15 virtual const SkPdfSourceInformationDictionary* asSourceInformationDictionary( ) 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 SkPdfSourceInformationDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfSourceInformationDictionary(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 SkPdfSourceInformationDictionary& operator=(const SkPdfSourceInformationDictio nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo Obj; return *this;} 523 SkPdfSourceInformationDictionary& operator=(const SkPdfSourceInformationDictio nary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofo Obj; return *this;}
523 524
525 /** (Required) A string or URL alias dictionary (see "URL Alias Dictionaries," b elow)
526 * identifying the URLs from which the source data was retrieved.
527 **/
528 bool has_AU() const {
529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "", NULL));
530 }
531
524 bool isAUAString() const { 532 bool isAUAString() const {
525 SkPdfObject* ret = NULL; 533 SkPdfObject* ret = NULL;
526 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "", &ret)) return false; 534 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "", &ret)) return false;
527 return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()- >GetDataType() == ePdfDataType_HexString; 535 return ret->podofo()->GetDataType() == ePdfDataType_String || ret->podofo()- >GetDataType() == ePdfDataType_HexString;
528 } 536 }
529 537
530 std::string getAUAsString() const { 538 std::string getAUAsString() const {
531 std::string ret = ""; 539 std::string ret = "";
532 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "", &ret)) return ret; 540 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "", &ret)) return ret;
533 // TODO(edisonn): warn about missing required field, assert for known good p dfs 541 // TODO(edisonn): warn about missing required field, assert for known good p dfs
534 return ""; 542 return "";
535 } 543 }
536 544
537 bool isAUADictionary() const { 545 bool isAUADictionary() const {
538 SkPdfObject* ret = NULL; 546 SkPdfObject* ret = NULL;
539 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "", &ret)) return false; 547 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "", &ret)) return false;
540 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; 548 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary;
541 } 549 }
542 550
543 SkPdfDictionary* getAUAsDictionary() const { 551 SkPdfDictionary* getAUAsDictionary() const {
544 SkPdfDictionary* ret = NULL; 552 SkPdfDictionary* ret = NULL;
545 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "", &ret)) return ret; 553 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "AU", "", &ret)) return ret;
546 // TODO(edisonn): warn about missing required field, assert for known good p dfs 554 // TODO(edisonn): warn about missing required field, assert for known good p dfs
547 return NULL; 555 return NULL;
548 } 556 }
549 557
558 /** (Optional) A time stamp giving the most recent date and time at which the co ntent
559 * set's contents were known to be up to date with the source data.
560 **/
561 bool has_TS() const {
562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS", "", NULL));
563 }
564
550 SkPdfDate TS() const { 565 SkPdfDate TS() const {
551 SkPdfDate ret; 566 SkPdfDate ret;
552 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS", "", &r et)) return ret; 567 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "TS", "", &r et)) return ret;
553 // 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
554 return SkPdfDate(); 569 return SkPdfDate();
555 } 570 }
556 571
572 /** (Optional) An expiration stamp giving the date and time at which the content set's
573 * contents should be considered out of date with the source data.
574 **/
575 bool has_E() const {
576 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", " ", NULL));
577 }
578
557 SkPdfDate E() const { 579 SkPdfDate E() const {
558 SkPdfDate ret; 580 SkPdfDate ret;
559 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", &re t)) return ret; 581 if (DateFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "E", "", &re t)) return ret;
560 // TODO(edisonn): warn about missing required field, assert for known good p dfs 582 // TODO(edisonn): warn about missing required field, assert for known good p dfs
561 return SkPdfDate(); 583 return SkPdfDate();
562 } 584 }
563 585
586 /** (Optional) A code indicating the type of form submission, if any, by which t he source
587 * data was accessed (see "Submit-Form Actions" on page 550):
588 * 0 Not accessed via a form submission
589 * 1 Accessed via an HTTP GET request
590 * 2 Accessed via an HTTP POST request
591 * This entry should be present only in source information dictionaries associa ted with
592 * page sets. Default value: 0.
593 **/
594 bool has_S() const {
595 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", " ", NULL));
596 }
597
564 long S() const { 598 long S() const {
565 long ret; 599 long ret;
566 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) return ret; 600 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) return ret;
567 // 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
568 return 0; 602 return 0;
569 } 603 }
570 604
605 /** (Optional; must be an indirect reference) A command dictionary (see "Command Dic-
606 * tionaries" on page 672) describing the command that caused the source data t o be
607 * retrieved. This entry should be present only in source information dictionar ies associ-
608 * ated with page sets.
609 **/
610 bool has_C() const {
611 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", " ", NULL));
612 }
613
571 SkPdfDictionary* C() const { 614 SkPdfDictionary* C() const {
572 SkPdfDictionary* ret; 615 SkPdfDictionary* ret;
573 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", " ", &ret)) return ret; 616 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "C", " ", &ret)) return ret;
574 // TODO(edisonn): warn about missing required field, assert for known good p dfs 617 // TODO(edisonn): warn about missing required field, assert for known good p dfs
575 return NULL; 618 return NULL;
576 } 619 }
577 620
578 }; 621 };
579 622
580 #endif // __DEFINED__SkPdfSourceInformationDictionary 623 #endif // __DEFINED__SkPdfSourceInformationDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698