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

Side by Side Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStructureTreeRootDictionary_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 "SkPdfStructureTreeRootDictionary_autogen.h"
2
3
4 #include "SkPdfNativeDoc.h"
5 SkString SkPdfStructureTreeRootDictionary::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 required field, assert for known good pdf s
10 return SkString();
11 }
12
13 bool SkPdfStructureTreeRootDictionary::has_Type() const {
14 return get("Type", "") != NULL;
15 }
16
17 bool SkPdfStructureTreeRootDictionary::isKADictionary(SkPdfNativeDoc* doc) {
18 SkPdfNativeObject* ret = get("K", "");
19 if (doc) {ret = doc->resolveReference(ret);}
20 return ret != NULL && ret->isDictionary();
21 }
22
23 SkPdfDictionary* SkPdfStructureTreeRootDictionary::getKAsDictionary(SkPdfNativeD oc* doc) {
24 SkPdfNativeObject* ret = get("K", "");
25 if (doc) {ret = doc->resolveReference(ret);}
26 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
27 // TODO(edisonn): warn about missing default value for optional fields
28 return NULL;
29 }
30
31 bool SkPdfStructureTreeRootDictionary::isKAArray(SkPdfNativeDoc* doc) {
32 SkPdfNativeObject* ret = get("K", "");
33 if (doc) {ret = doc->resolveReference(ret);}
34 return ret != NULL && ret->isArray();
35 }
36
37 SkPdfArray* SkPdfStructureTreeRootDictionary::getKAsArray(SkPdfNativeDoc* doc) {
38 SkPdfNativeObject* ret = get("K", "");
39 if (doc) {ret = doc->resolveReference(ret);}
40 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR eference())) return (SkPdfArray*)ret;
41 // TODO(edisonn): warn about missing default value for optional fields
42 return NULL;
43 }
44
45 bool SkPdfStructureTreeRootDictionary::has_K() const {
46 return get("K", "") != NULL;
47 }
48
49 bool SkPdfStructureTreeRootDictionary::isIDTreeAName(SkPdfNativeDoc* doc) {
50 SkPdfNativeObject* ret = get("IDTree", "");
51 if (doc) {ret = doc->resolveReference(ret);}
52 return ret != NULL && ret->isName();
53 }
54
55 SkString SkPdfStructureTreeRootDictionary::getIDTreeAsName(SkPdfNativeDoc* doc) {
56 SkPdfNativeObject* ret = get("IDTree", "");
57 if (doc) {ret = doc->resolveReference(ret);}
58 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe ference())) return ret->nameValue2();
59 // TODO(edisonn): warn about missing default value for optional fields
60 return SkString();
61 }
62
63 bool SkPdfStructureTreeRootDictionary::isIDTreeATree(SkPdfNativeDoc* doc) {
64 SkPdfNativeObject* ret = get("IDTree", "");
65 if (doc) {ret = doc->resolveReference(ret);}
66 return ret != NULL && false;
67 }
68
69 SkPdfTree SkPdfStructureTreeRootDictionary::getIDTreeAsTree(SkPdfNativeDoc* doc) {
70 SkPdfNativeObject* ret = get("IDTree", "");
71 if (doc) {ret = doc->resolveReference(ret);}
72 if ((ret != NULL && false) || (doc == NULL && ret != NULL && ret->isReference( ))) return ret->treeValue();
73 // TODO(edisonn): warn about missing default value for optional fields
74 return SkPdfTree();
75 }
76
77 bool SkPdfStructureTreeRootDictionary::has_IDTree() const {
78 return get("IDTree", "") != NULL;
79 }
80
81 bool SkPdfStructureTreeRootDictionary::isParentTreeANumber(SkPdfNativeDoc* doc) {
82 SkPdfNativeObject* ret = get("ParentTree", "");
83 if (doc) {ret = doc->resolveReference(ret);}
84 return ret != NULL && ret->isNumber();
85 }
86
87 double SkPdfStructureTreeRootDictionary::getParentTreeAsNumber(SkPdfNativeDoc* d oc) {
88 SkPdfNativeObject* ret = get("ParentTree", "");
89 if (doc) {ret = doc->resolveReference(ret);}
90 if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->is Reference())) return ret->numberValue();
91 // TODO(edisonn): warn about missing default value for optional fields
92 return 0;
93 }
94
95 bool SkPdfStructureTreeRootDictionary::isParentTreeATree(SkPdfNativeDoc* doc) {
96 SkPdfNativeObject* ret = get("ParentTree", "");
97 if (doc) {ret = doc->resolveReference(ret);}
98 return ret != NULL && false;
99 }
100
101 SkPdfTree SkPdfStructureTreeRootDictionary::getParentTreeAsTree(SkPdfNativeDoc* doc) {
102 SkPdfNativeObject* ret = get("ParentTree", "");
103 if (doc) {ret = doc->resolveReference(ret);}
104 if ((ret != NULL && false) || (doc == NULL && ret != NULL && ret->isReference( ))) return ret->treeValue();
105 // TODO(edisonn): warn about missing default value for optional fields
106 return SkPdfTree();
107 }
108
109 bool SkPdfStructureTreeRootDictionary::has_ParentTree() const {
110 return get("ParentTree", "") != NULL;
111 }
112
113 int64_t SkPdfStructureTreeRootDictionary::ParentTreeNextKey(SkPdfNativeDoc* doc) {
114 SkPdfNativeObject* ret = get("ParentTreeNextKey", "");
115 if (doc) {ret = doc->resolveReference(ret);}
116 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i sReference())) return ret->intValue();
117 // TODO(edisonn): warn about missing default value for optional fields
118 return 0;
119 }
120
121 bool SkPdfStructureTreeRootDictionary::has_ParentTreeNextKey() const {
122 return get("ParentTreeNextKey", "") != NULL;
123 }
124
125 SkPdfDictionary* SkPdfStructureTreeRootDictionary::RoleMap(SkPdfNativeDoc* doc) {
126 SkPdfNativeObject* ret = get("RoleMap", "");
127 if (doc) {ret = doc->resolveReference(ret);}
128 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
129 // TODO(edisonn): warn about missing default value for optional fields
130 return NULL;
131 }
132
133 bool SkPdfStructureTreeRootDictionary::has_RoleMap() const {
134 return get("RoleMap", "") != NULL;
135 }
136
137 SkPdfDictionary* SkPdfStructureTreeRootDictionary::ClassMap(SkPdfNativeDoc* doc) {
138 SkPdfNativeObject* ret = get("ClassMap", "");
139 if (doc) {ret = doc->resolveReference(ret);}
140 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret ->isReference())) return (SkPdfDictionary*)ret;
141 // TODO(edisonn): warn about missing default value for optional fields
142 return NULL;
143 }
144
145 bool SkPdfStructureTreeRootDictionary::has_ClassMap() const {
146 return get("ClassMap", "") != NULL;
147 }
148
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698