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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSourceInformationDictionary_autogen.cpp

Issue 22900010: pdfviewer: check in pdfapi classes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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
(Empty)
1 #include "SkPdfSourceInformationDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 bool SkPdfSourceInformationDictionary::isAUAString(SkPdfNativeDoc* doc) {
6 SkPdfNativeObject* ret = get("AU", "");
7 if (doc) {ret = doc->resolveReference(ret);}
8 return ret != NULL && ret->isAnyString();
9 }
10
11 SkString SkPdfSourceInformationDictionary::getAUAsString(SkPdfNativeDoc* doc) {
12 SkPdfNativeObject* ret = get("AU", "");
13 if (doc) {ret = doc->resolveReference(ret);}
14 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
15 // TODO(edisonn): warn about missing required field, assert for known good pdf s
16 return SkString();
17 }
18
19 bool SkPdfSourceInformationDictionary::isAUADictionary(SkPdfNativeDoc* doc) {
20 SkPdfNativeObject* ret = get("AU", "");
21 if (doc) {ret = doc->resolveReference(ret);}
22 return ret != NULL && ret->isDictionary();
23 }
24
25 SkPdfDictionary* SkPdfSourceInformationDictionary::getAUAsDictionary(SkPdfNative Doc* doc) {
26 SkPdfNativeObject* ret = get("AU", "");
27 if (doc) {ret = doc->resolveReference(ret);}
28 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
29 // TODO(edisonn): warn about missing required field, assert for known good pdf s
30 return NULL;
31 }
32
33 bool SkPdfSourceInformationDictionary::has_AU() const {
34 return get("AU", "") != NULL;
35 }
36
37 SkPdfDate SkPdfSourceInformationDictionary::TS(SkPdfNativeDoc* doc) {
38 SkPdfNativeObject* ret = get("TS", "");
39 if (doc) {ret = doc->resolveReference(ret);}
40 if ((ret != NULL && ret->isDate()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->dateValue();
41 // TODO(edisonn): warn about missing default value for optional fields
42 return SkPdfDate();
43 }
44
45 bool SkPdfSourceInformationDictionary::has_TS() const {
46 return get("TS", "") != NULL;
47 }
48
49 SkPdfDate SkPdfSourceInformationDictionary::E(SkPdfNativeDoc* doc) {
50 SkPdfNativeObject* ret = get("E", "");
51 if (doc) {ret = doc->resolveReference(ret);}
52 if ((ret != NULL && ret->isDate()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->dateValue();
53 // TODO(edisonn): warn about missing default value for optional fields
54 return SkPdfDate();
55 }
56
57 bool SkPdfSourceInformationDictionary::has_E() const {
58 return get("E", "") != NULL;
59 }
60
61 int64_t SkPdfSourceInformationDictionary::S(SkPdfNativeDoc* doc) {
62 SkPdfNativeObject* ret = get("S", "");
63 if (doc) {ret = doc->resolveReference(ret);}
64 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->intValue();
65 // TODO(edisonn): warn about missing default value for optional fields
66 return 0;
67 }
68
69 bool SkPdfSourceInformationDictionary::has_S() const {
70 return get("S", "") != NULL;
71 }
72
73 SkPdfDictionary* SkPdfSourceInformationDictionary::C(SkPdfNativeDoc* doc) {
74 SkPdfNativeObject* ret = get("C", "");
75 if (doc) {ret = doc->resolveReference(ret);}
76 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
77 // TODO(edisonn): warn about missing default value for optional fields
78 return NULL;
79 }
80
81 bool SkPdfSourceInformationDictionary::has_C() const {
82 return get("C", "") != NULL;
83 }
84
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698