OLD | NEW |
(Empty) | |
| 1 #include "SkPdfStreamCommonDictionary_autogen.h" |
| 2 |
| 3 |
| 4 #include "SkPdfNativeDoc.h" |
| 5 int64_t SkPdfStreamCommonDictionary::Length(SkPdfNativeDoc* doc) { |
| 6 SkPdfNativeObject* ret = get("Length", ""); |
| 7 if (doc) {ret = doc->resolveReference(ret);} |
| 8 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->intValue(); |
| 9 // TODO(edisonn): warn about missing required field, assert for known good pdf
s |
| 10 return 0; |
| 11 } |
| 12 |
| 13 bool SkPdfStreamCommonDictionary::has_Length() const { |
| 14 return get("Length", "") != NULL; |
| 15 } |
| 16 |
| 17 bool SkPdfStreamCommonDictionary::isFilterAName(SkPdfNativeDoc* doc) { |
| 18 SkPdfNativeObject* ret = get("Filter", ""); |
| 19 if (doc) {ret = doc->resolveReference(ret);} |
| 20 return ret != NULL && ret->isName(); |
| 21 } |
| 22 |
| 23 SkString SkPdfStreamCommonDictionary::getFilterAsName(SkPdfNativeDoc* doc) { |
| 24 SkPdfNativeObject* ret = get("Filter", ""); |
| 25 if (doc) {ret = doc->resolveReference(ret);} |
| 26 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); |
| 27 // TODO(edisonn): warn about missing default value for optional fields |
| 28 return SkString(); |
| 29 } |
| 30 |
| 31 bool SkPdfStreamCommonDictionary::isFilterAArray(SkPdfNativeDoc* doc) { |
| 32 SkPdfNativeObject* ret = get("Filter", ""); |
| 33 if (doc) {ret = doc->resolveReference(ret);} |
| 34 return ret != NULL && ret->isArray(); |
| 35 } |
| 36 |
| 37 SkPdfArray* SkPdfStreamCommonDictionary::getFilterAsArray(SkPdfNativeDoc* doc) { |
| 38 SkPdfNativeObject* ret = get("Filter", ""); |
| 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 SkPdfStreamCommonDictionary::has_Filter() const { |
| 46 return get("Filter", "") != NULL; |
| 47 } |
| 48 |
| 49 bool SkPdfStreamCommonDictionary::isDecodeParmsADictionary(SkPdfNativeDoc* doc)
{ |
| 50 SkPdfNativeObject* ret = get("DecodeParms", ""); |
| 51 if (doc) {ret = doc->resolveReference(ret);} |
| 52 return ret != NULL && ret->isDictionary(); |
| 53 } |
| 54 |
| 55 SkPdfDictionary* SkPdfStreamCommonDictionary::getDecodeParmsAsDictionary(SkPdfNa
tiveDoc* doc) { |
| 56 SkPdfNativeObject* ret = get("DecodeParms", ""); |
| 57 if (doc) {ret = doc->resolveReference(ret);} |
| 58 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; |
| 59 // TODO(edisonn): warn about missing default value for optional fields |
| 60 return NULL; |
| 61 } |
| 62 |
| 63 bool SkPdfStreamCommonDictionary::isDecodeParmsAArray(SkPdfNativeDoc* doc) { |
| 64 SkPdfNativeObject* ret = get("DecodeParms", ""); |
| 65 if (doc) {ret = doc->resolveReference(ret);} |
| 66 return ret != NULL && ret->isArray(); |
| 67 } |
| 68 |
| 69 SkPdfArray* SkPdfStreamCommonDictionary::getDecodeParmsAsArray(SkPdfNativeDoc* d
oc) { |
| 70 SkPdfNativeObject* ret = get("DecodeParms", ""); |
| 71 if (doc) {ret = doc->resolveReference(ret);} |
| 72 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; |
| 73 // TODO(edisonn): warn about missing default value for optional fields |
| 74 return NULL; |
| 75 } |
| 76 |
| 77 bool SkPdfStreamCommonDictionary::has_DecodeParms() const { |
| 78 return get("DecodeParms", "") != NULL; |
| 79 } |
| 80 |
| 81 SkPdfFileSpec SkPdfStreamCommonDictionary::F(SkPdfNativeDoc* doc) { |
| 82 SkPdfNativeObject* ret = get("F", ""); |
| 83 if (doc) {ret = doc->resolveReference(ret);} |
| 84 if ((ret != NULL && false) || (doc == NULL && ret != NULL && ret->isReference(
))) return ret->fileSpecValue(); |
| 85 // TODO(edisonn): warn about missing default value for optional fields |
| 86 return SkPdfFileSpec(); |
| 87 } |
| 88 |
| 89 bool SkPdfStreamCommonDictionary::has_F() const { |
| 90 return get("F", "") != NULL; |
| 91 } |
| 92 |
| 93 bool SkPdfStreamCommonDictionary::isFFilterAName(SkPdfNativeDoc* doc) { |
| 94 SkPdfNativeObject* ret = get("FFilter", ""); |
| 95 if (doc) {ret = doc->resolveReference(ret);} |
| 96 return ret != NULL && ret->isName(); |
| 97 } |
| 98 |
| 99 SkString SkPdfStreamCommonDictionary::getFFilterAsName(SkPdfNativeDoc* doc) { |
| 100 SkPdfNativeObject* ret = get("FFilter", ""); |
| 101 if (doc) {ret = doc->resolveReference(ret);} |
| 102 if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isRe
ference())) return ret->nameValue2(); |
| 103 // TODO(edisonn): warn about missing default value for optional fields |
| 104 return SkString(); |
| 105 } |
| 106 |
| 107 bool SkPdfStreamCommonDictionary::isFFilterAArray(SkPdfNativeDoc* doc) { |
| 108 SkPdfNativeObject* ret = get("FFilter", ""); |
| 109 if (doc) {ret = doc->resolveReference(ret);} |
| 110 return ret != NULL && ret->isArray(); |
| 111 } |
| 112 |
| 113 SkPdfArray* SkPdfStreamCommonDictionary::getFFilterAsArray(SkPdfNativeDoc* doc)
{ |
| 114 SkPdfNativeObject* ret = get("FFilter", ""); |
| 115 if (doc) {ret = doc->resolveReference(ret);} |
| 116 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; |
| 117 // TODO(edisonn): warn about missing default value for optional fields |
| 118 return NULL; |
| 119 } |
| 120 |
| 121 bool SkPdfStreamCommonDictionary::has_FFilter() const { |
| 122 return get("FFilter", "") != NULL; |
| 123 } |
| 124 |
| 125 bool SkPdfStreamCommonDictionary::isFDecodeParmsADictionary(SkPdfNativeDoc* doc)
{ |
| 126 SkPdfNativeObject* ret = get("FDecodeParms", ""); |
| 127 if (doc) {ret = doc->resolveReference(ret);} |
| 128 return ret != NULL && ret->isDictionary(); |
| 129 } |
| 130 |
| 131 SkPdfDictionary* SkPdfStreamCommonDictionary::getFDecodeParmsAsDictionary(SkPdfN
ativeDoc* doc) { |
| 132 SkPdfNativeObject* ret = get("FDecodeParms", ""); |
| 133 if (doc) {ret = doc->resolveReference(ret);} |
| 134 if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret
->isReference())) return (SkPdfDictionary*)ret; |
| 135 // TODO(edisonn): warn about missing default value for optional fields |
| 136 return NULL; |
| 137 } |
| 138 |
| 139 bool SkPdfStreamCommonDictionary::isFDecodeParmsAArray(SkPdfNativeDoc* doc) { |
| 140 SkPdfNativeObject* ret = get("FDecodeParms", ""); |
| 141 if (doc) {ret = doc->resolveReference(ret);} |
| 142 return ret != NULL && ret->isArray(); |
| 143 } |
| 144 |
| 145 SkPdfArray* SkPdfStreamCommonDictionary::getFDecodeParmsAsArray(SkPdfNativeDoc*
doc) { |
| 146 SkPdfNativeObject* ret = get("FDecodeParms", ""); |
| 147 if (doc) {ret = doc->resolveReference(ret);} |
| 148 if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isR
eference())) return (SkPdfArray*)ret; |
| 149 // TODO(edisonn): warn about missing default value for optional fields |
| 150 return NULL; |
| 151 } |
| 152 |
| 153 bool SkPdfStreamCommonDictionary::has_FDecodeParms() const { |
| 154 return get("FDecodeParms", "") != NULL; |
| 155 } |
| 156 |
OLD | NEW |