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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfImageDictionary_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 "SkPdfImageDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 SkString SkPdfImageDictionary::Type(SkPdfNativeDoc* doc) {
6 SkPdfNativeObject* ret = get("Type", "");
7 if (doc) {ret = doc->resolveReference(ret);}
8 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
9 // TODO(edisonn): warn about missing default value for optional fields
10 return SkString();
11 }
12
13 bool SkPdfImageDictionary::has_Type() const {
14 return get("Type", "") != NULL;
15 }
16
17 SkString SkPdfImageDictionary::Subtype(SkPdfNativeDoc* doc) {
18 SkPdfNativeObject* ret = get("Subtype", "");
19 if (doc) {ret = doc->resolveReference(ret);}
20 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
21 // TODO(edisonn): warn about missing required field, assert for known good pdf s
22 return SkString();
23 }
24
25 bool SkPdfImageDictionary::has_Subtype() const {
26 return get("Subtype", "") != NULL;
27 }
28
29 int64_t SkPdfImageDictionary::Width(SkPdfNativeDoc* doc) {
30 SkPdfNativeObject* ret = get("Width", "");
31 if (doc) {ret = doc->resolveReference(ret);}
32 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->intValue();
33 // TODO(edisonn): warn about missing required field, assert for known good pdf s
34 return 0;
35 }
36
37 bool SkPdfImageDictionary::has_Width() const {
38 return get("Width", "") != NULL;
39 }
40
41 int64_t SkPdfImageDictionary::Height(SkPdfNativeDoc* doc) {
42 SkPdfNativeObject* ret = get("Height", "");
43 if (doc) {ret = doc->resolveReference(ret);}
44 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->intValue();
45 // TODO(edisonn): warn about missing required field, assert for known good pdf s
46 return 0;
47 }
48
49 bool SkPdfImageDictionary::has_Height() const {
50 return get("Height", "") != NULL;
51 }
52
53 bool SkPdfImageDictionary::isColorSpaceAName(SkPdfNativeDoc* doc) {
54 SkPdfNativeObject* ret = get("ColorSpace", "");
55 if (doc) {ret = doc->resolveReference(ret);}
56 return ret != NULL && ret->isName();
57 }
58
59 SkString SkPdfImageDictionary::getColorSpaceAsName(SkPdfNativeDoc* doc) {
60 SkPdfNativeObject* ret = get("ColorSpace", "");
61 if (doc) {ret = doc->resolveReference(ret);}
62 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
63 // TODO(edisonn): warn about missing default value for optional fields
64 return SkString();
65 }
66
67 bool SkPdfImageDictionary::isColorSpaceAArray(SkPdfNativeDoc* doc) {
68 SkPdfNativeObject* ret = get("ColorSpace", "");
69 if (doc) {ret = doc->resolveReference(ret);}
70 return ret != NULL && ret->isArray();
71 }
72
73 SkPdfArray* SkPdfImageDictionary::getColorSpaceAsArray(SkPdfNativeDoc* doc) {
74 SkPdfNativeObject* ret = get("ColorSpace", "");
75 if (doc) {ret = doc->resolveReference(ret);}
76 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
77 // TODO(edisonn): warn about missing default value for optional fields
78 return NULL;
79 }
80
81 bool SkPdfImageDictionary::has_ColorSpace() const {
82 return get("ColorSpace", "") != NULL;
83 }
84
85 int64_t SkPdfImageDictionary::BitsPerComponent(SkPdfNativeDoc* doc) {
86 SkPdfNativeObject* ret = get("BitsPerComponent", "");
87 if (doc) {ret = doc->resolveReference(ret);}
88 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->intValue();
89 // TODO(edisonn): warn about missing default value for optional fields
90 return 0;
91 }
92
93 bool SkPdfImageDictionary::has_BitsPerComponent() const {
94 return get("BitsPerComponent", "") != NULL;
95 }
96
97 SkString SkPdfImageDictionary::Intent(SkPdfNativeDoc* doc) {
98 SkPdfNativeObject* ret = get("Intent", "");
99 if (doc) {ret = doc->resolveReference(ret);}
100 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
101 // TODO(edisonn): warn about missing default value for optional fields
102 return SkString();
103 }
104
105 bool SkPdfImageDictionary::has_Intent() const {
106 return get("Intent", "") != NULL;
107 }
108
109 bool SkPdfImageDictionary::ImageMask(SkPdfNativeDoc* doc) {
110 SkPdfNativeObject* ret = get("ImageMask", "");
111 if (doc) {ret = doc->resolveReference(ret);}
112 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->boolValue();
113 // TODO(edisonn): warn about missing default value for optional fields
114 return false;
115 }
116
117 bool SkPdfImageDictionary::has_ImageMask() const {
118 return get("ImageMask", "") != NULL;
119 }
120
121 bool SkPdfImageDictionary::isMaskAStream(SkPdfNativeDoc* doc) {
122 SkPdfNativeObject* ret = get("Mask", "");
123 if (doc) {ret = doc->resolveReference(ret);}
124 return ret != NULL && ret->hasStream();
125 }
126
127 SkPdfStream* SkPdfImageDictionary::getMaskAsStream(SkPdfNativeDoc* doc) {
128 SkPdfNativeObject* ret = get("Mask", "");
129 if (doc) {ret = doc->resolveReference(ret);}
130 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
131 // TODO(edisonn): warn about missing default value for optional fields
132 return NULL;
133 }
134
135 bool SkPdfImageDictionary::isMaskAArray(SkPdfNativeDoc* doc) {
136 SkPdfNativeObject* ret = get("Mask", "");
137 if (doc) {ret = doc->resolveReference(ret);}
138 return ret != NULL && ret->isArray();
139 }
140
141 SkPdfArray* SkPdfImageDictionary::getMaskAsArray(SkPdfNativeDoc* doc) {
142 SkPdfNativeObject* ret = get("Mask", "");
143 if (doc) {ret = doc->resolveReference(ret);}
144 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
145 // TODO(edisonn): warn about missing default value for optional fields
146 return NULL;
147 }
148
149 bool SkPdfImageDictionary::has_Mask() const {
150 return get("Mask", "") != NULL;
151 }
152
153 SkPdfImageDictionary* SkPdfImageDictionary::SMask(SkPdfNativeDoc* doc) {
154 SkPdfNativeObject* ret = get("SMask", "");
155 if (doc) {ret = doc->resolveReference(ret);}
156 if ((ret != NULL && ret->isDictionary() && ((SkPdfImageDictionary*)ret)->valid ()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfImageDic tionary*)ret;
157 // TODO(edisonn): warn about missing default value for optional fields
158 return NULL;
159 }
160
161 bool SkPdfImageDictionary::has_SMask() const {
162 return get("SMask", "") != NULL;
163 }
164
165 SkPdfArray* SkPdfImageDictionary::Decode(SkPdfNativeDoc* doc) {
166 SkPdfNativeObject* ret = get("Decode", "");
167 if (doc) {ret = doc->resolveReference(ret);}
168 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
169 // TODO(edisonn): warn about missing default value for optional fields
170 return NULL;
171 }
172
173 bool SkPdfImageDictionary::has_Decode() const {
174 return get("Decode", "") != NULL;
175 }
176
177 bool SkPdfImageDictionary::Interpolate(SkPdfNativeDoc* doc) {
178 SkPdfNativeObject* ret = get("Interpolate", "");
179 if (doc) {ret = doc->resolveReference(ret);}
180 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->boolValue();
181 // TODO(edisonn): warn about missing default value for optional fields
182 return false;
183 }
184
185 bool SkPdfImageDictionary::has_Interpolate() const {
186 return get("Interpolate", "") != NULL;
187 }
188
189 SkPdfArray* SkPdfImageDictionary::Alternates(SkPdfNativeDoc* doc) {
190 SkPdfNativeObject* ret = get("Alternates", "");
191 if (doc) {ret = doc->resolveReference(ret);}
192 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
193 // TODO(edisonn): warn about missing default value for optional fields
194 return NULL;
195 }
196
197 bool SkPdfImageDictionary::has_Alternates() const {
198 return get("Alternates", "") != NULL;
199 }
200
201 SkString SkPdfImageDictionary::Name(SkPdfNativeDoc* doc) {
202 SkPdfNativeObject* ret = get("Name", "");
203 if (doc) {ret = doc->resolveReference(ret);}
204 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
205 // TODO(edisonn): warn about missing default value for optional fields
206 return SkString();
207 }
208
209 bool SkPdfImageDictionary::has_Name() const {
210 return get("Name", "") != NULL;
211 }
212
213 int64_t SkPdfImageDictionary::StructParent(SkPdfNativeDoc* doc) {
214 SkPdfNativeObject* ret = get("StructParent", "");
215 if (doc) {ret = doc->resolveReference(ret);}
216 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->intValue();
217 // TODO(edisonn): warn about missing default value for optional fields
218 return 0;
219 }
220
221 bool SkPdfImageDictionary::has_StructParent() const {
222 return get("StructParent", "") != NULL;
223 }
224
225 SkString SkPdfImageDictionary::ID(SkPdfNativeDoc* doc) {
226 SkPdfNativeObject* ret = get("ID", "");
227 if (doc) {ret = doc->resolveReference(ret);}
228 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret- >isReference())) return ret->stringValue2();
229 // TODO(edisonn): warn about missing default value for optional fields
230 return SkString();
231 }
232
233 bool SkPdfImageDictionary::has_ID() const {
234 return get("ID", "") != NULL;
235 }
236
237 SkPdfDictionary* SkPdfImageDictionary::OPI(SkPdfNativeDoc* doc) {
238 SkPdfNativeObject* ret = get("OPI", "");
239 if (doc) {ret = doc->resolveReference(ret);}
240 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
241 // TODO(edisonn): warn about missing default value for optional fields
242 return NULL;
243 }
244
245 bool SkPdfImageDictionary::has_OPI() const {
246 return get("OPI", "") != NULL;
247 }
248
249 SkPdfStream* SkPdfImageDictionary::Metadata(SkPdfNativeDoc* doc) {
250 SkPdfNativeObject* ret = get("Metadata", "");
251 if (doc) {ret = doc->resolveReference(ret);}
252 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->getStream();
253 // TODO(edisonn): warn about missing default value for optional fields
254 return NULL;
255 }
256
257 bool SkPdfImageDictionary::has_Metadata() const {
258 return get("Metadata", "") != NULL;
259 }
260
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698