OLD | NEW |
(Empty) | |
| 1 #include "SkPdfJavascriptDictionary_autogen.h" |
| 2 |
| 3 |
| 4 #include "SkPdfNativeDoc.h" |
| 5 bool SkPdfJavascriptDictionary::isBeforeAString(SkPdfNativeDoc* doc) { |
| 6 SkPdfNativeObject* ret = get("Before", ""); |
| 7 if (doc) {ret = doc->resolveReference(ret);} |
| 8 return ret != NULL && ret->isAnyString(); |
| 9 } |
| 10 |
| 11 SkString SkPdfJavascriptDictionary::getBeforeAsString(SkPdfNativeDoc* doc) { |
| 12 SkPdfNativeObject* ret = get("Before", ""); |
| 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 default value for optional fields |
| 16 return SkString(); |
| 17 } |
| 18 |
| 19 bool SkPdfJavascriptDictionary::isBeforeAStream(SkPdfNativeDoc* doc) { |
| 20 SkPdfNativeObject* ret = get("Before", ""); |
| 21 if (doc) {ret = doc->resolveReference(ret);} |
| 22 return ret != NULL && ret->hasStream(); |
| 23 } |
| 24 |
| 25 SkPdfStream* SkPdfJavascriptDictionary::getBeforeAsStream(SkPdfNativeDoc* doc) { |
| 26 SkPdfNativeObject* ret = get("Before", ""); |
| 27 if (doc) {ret = doc->resolveReference(ret);} |
| 28 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->getStream(); |
| 29 // TODO(edisonn): warn about missing default value for optional fields |
| 30 return NULL; |
| 31 } |
| 32 |
| 33 bool SkPdfJavascriptDictionary::has_Before() const { |
| 34 return get("Before", "") != NULL; |
| 35 } |
| 36 |
| 37 bool SkPdfJavascriptDictionary::isAfterAString(SkPdfNativeDoc* doc) { |
| 38 SkPdfNativeObject* ret = get("After", ""); |
| 39 if (doc) {ret = doc->resolveReference(ret);} |
| 40 return ret != NULL && ret->isAnyString(); |
| 41 } |
| 42 |
| 43 SkString SkPdfJavascriptDictionary::getAfterAsString(SkPdfNativeDoc* doc) { |
| 44 SkPdfNativeObject* ret = get("After", ""); |
| 45 if (doc) {ret = doc->resolveReference(ret);} |
| 46 if ((ret != NULL && ret->isAnyString()) || (doc == NULL && ret != NULL && ret-
>isReference())) return ret->stringValue2(); |
| 47 // TODO(edisonn): warn about missing default value for optional fields |
| 48 return SkString(); |
| 49 } |
| 50 |
| 51 bool SkPdfJavascriptDictionary::isAfterAStream(SkPdfNativeDoc* doc) { |
| 52 SkPdfNativeObject* ret = get("After", ""); |
| 53 if (doc) {ret = doc->resolveReference(ret);} |
| 54 return ret != NULL && ret->hasStream(); |
| 55 } |
| 56 |
| 57 SkPdfStream* SkPdfJavascriptDictionary::getAfterAsStream(SkPdfNativeDoc* doc) { |
| 58 SkPdfNativeObject* ret = get("After", ""); |
| 59 if (doc) {ret = doc->resolveReference(ret);} |
| 60 if ((ret != NULL && ret->hasStream()) || (doc == NULL && ret != NULL && ret->i
sReference())) return ret->getStream(); |
| 61 // TODO(edisonn): warn about missing default value for optional fields |
| 62 return NULL; |
| 63 } |
| 64 |
| 65 bool SkPdfJavascriptDictionary::has_After() const { |
| 66 return get("After", "") != NULL; |
| 67 } |
| 68 |
| 69 SkPdfArray* SkPdfJavascriptDictionary::Doc(SkPdfNativeDoc* doc) { |
| 70 SkPdfNativeObject* ret = get("Doc", ""); |
| 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 SkPdfJavascriptDictionary::has_Doc() const { |
| 78 return get("Doc", "") != NULL; |
| 79 } |
| 80 |
OLD | NEW |