1 /* 2 * Copyright 2013 Google Inc. 3 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #include "SkPdfCcittfaxdecodeFilterDictionary_autogen.h" 9 #include "SkPdfNativeDoc.h" 10 11 int64_t SkPdfCcittfaxdecodeFilterDictionary::K(SkPdfNativeDoc* doc) { 12 SkPdfNativeObject* ret = get("K", ""); 13 if (doc) {ret = doc->resolveReference(ret);} 14 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->intValue(); 15 // TODO(edisonn): warn about missing default value for optional fields 16 return 0; 17 } 18 19 bool SkPdfCcittfaxdecodeFilterDictionary::has_K() const { 20 return get("K", "") != NULL; 21 } 22 23 bool SkPdfCcittfaxdecodeFilterDictionary::EndOfLine(SkPdfNativeDoc* doc) { 24 SkPdfNativeObject* ret = get("EndOfLine", ""); 25 if (doc) {ret = doc->resolveReference(ret);} 26 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->boolValue(); 27 // TODO(edisonn): warn about missing default value for optional fields 28 return false; 29 } 30 31 bool SkPdfCcittfaxdecodeFilterDictionary::has_EndOfLine() const { 32 return get("EndOfLine", "") != NULL; 33 } 34 35 bool SkPdfCcittfaxdecodeFilterDictionary::EncodedByteAlign(SkPdfNativeDoc* doc) { 36 SkPdfNativeObject* ret = get("EncodedByteAlign", ""); 37 if (doc) {ret = doc->resolveReference(ret);} 38 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->boolValue(); 39 // TODO(edisonn): warn about missing default value for optional fields 40 return false; 41 } 42 43 bool SkPdfCcittfaxdecodeFilterDictionary::has_EncodedByteAlign() const { 44 return get("EncodedByteAlign", "") != NULL; 45 } 46 47 int64_t SkPdfCcittfaxdecodeFilterDictionary::Columns(SkPdfNativeDoc* doc) { 48 SkPdfNativeObject* ret = get("Columns", ""); 49 if (doc) {ret = doc->resolveReference(ret);} 50 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->intValue(); 51 // TODO(edisonn): warn about missing default value for optional fields 52 return 0; 53 } 54 55 bool SkPdfCcittfaxdecodeFilterDictionary::has_Columns() const { 56 return get("Columns", "") != NULL; 57 } 58 59 int64_t SkPdfCcittfaxdecodeFilterDictionary::Rows(SkPdfNativeDoc* doc) { 60 SkPdfNativeObject* ret = get("Rows", ""); 61 if (doc) {ret = doc->resolveReference(ret);} 62 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->intValue(); 63 // TODO(edisonn): warn about missing default value for optional fields 64 return 0; 65 } 66 67 bool SkPdfCcittfaxdecodeFilterDictionary::has_Rows() const { 68 return get("Rows", "") != NULL; 69 } 70 71 bool SkPdfCcittfaxdecodeFilterDictionary::EndOfBlock(SkPdfNativeDoc* doc) { 72 SkPdfNativeObject* ret = get("EndOfBlock", ""); 73 if (doc) {ret = doc->resolveReference(ret);} 74 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->boolValue(); 75 // TODO(edisonn): warn about missing default value for optional fields 76 return false; 77 } 78 79 bool SkPdfCcittfaxdecodeFilterDictionary::has_EndOfBlock() const { 80 return get("EndOfBlock", "") != NULL; 81 } 82 83 bool SkPdfCcittfaxdecodeFilterDictionary::BlackIs1(SkPdfNativeDoc* doc) { 84 SkPdfNativeObject* ret = get("BlackIs1", ""); 85 if (doc) {ret = doc->resolveReference(ret);} 86 if ((ret != NULL && ret->isBoolean()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->boolValue(); 87 // TODO(edisonn): warn about missing default value for optional fields 88 return false; 89 } 90 91 bool SkPdfCcittfaxdecodeFilterDictionary::has_BlackIs1() const { 92 return get("BlackIs1", "") != NULL; 93 } 94 95 int64_t SkPdfCcittfaxdecodeFilterDictionary::DamagedRowsBeforeError(SkPdfNativeDoc* doc) { 96 SkPdfNativeObject* ret = get("DamagedRowsBeforeError", ""); 97 if (doc) {ret = doc->resolveReference(ret);} 98 if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->intValue(); 99 // TODO(edisonn): warn about missing default value for optional fields 100 return 0; 101 } 102 103 bool SkPdfCcittfaxdecodeFilterDictionary::has_DamagedRowsBeforeError() const { 104 return get("DamagedRowsBeforeError", "") != NULL; 105 } 106