#include "SkPdfBorderStyleDictionary_autogen.h" #include "SkPdfNativeDoc.h" SkString SkPdfBorderStyleDictionary::Type(SkPdfNativeDoc* doc) { SkPdfNativeObject* ret = get("Type", ""); if (doc) {ret = doc->resolveReference(ret);} if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->nameValue2(); // TODO(edisonn): warn about missing default value for optional fields return SkString(); } bool SkPdfBorderStyleDictionary::has_Type() const { return get("Type", "") != NULL; } double SkPdfBorderStyleDictionary::W(SkPdfNativeDoc* doc) { SkPdfNativeObject* ret = get("W", ""); if (doc) {ret = doc->resolveReference(ret);} if ((ret != NULL && ret->isNumber()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->numberValue(); // TODO(edisonn): warn about missing default value for optional fields return 0; } bool SkPdfBorderStyleDictionary::has_W() const { return get("W", "") != NULL; } SkString SkPdfBorderStyleDictionary::S(SkPdfNativeDoc* doc) { SkPdfNativeObject* ret = get("S", ""); if (doc) {ret = doc->resolveReference(ret);} if ((ret != NULL && ret->isName()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->nameValue2(); // TODO(edisonn): warn about missing default value for optional fields return SkString(); } bool SkPdfBorderStyleDictionary::has_S() const { return get("S", "") != NULL; } SkPdfArray* SkPdfBorderStyleDictionary::D(SkPdfNativeDoc* doc) { SkPdfNativeObject* ret = get("D", ""); if (doc) {ret = doc->resolveReference(ret);} if ((ret != NULL && ret->isArray()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfArray*)ret; // TODO(edisonn): warn about missing default value for optional fields return NULL; } bool SkPdfBorderStyleDictionary::has_D() const { return get("D", "") != NULL; }