skia2/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStructureElementAccessDictionary_autogen.cpp
edisonn@google.com 8cee797901 pdfviewer: check in pdfapi classes
Review URL: https://codereview.chromium.org/22900010

git-svn-id: http://skia.googlecode.com/svn/trunk@10834 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-20 18:56:49 +00:00

29 lines
1.1 KiB
C++

#include "SkPdfStructureElementAccessDictionary_autogen.h"
#include "SkPdfNativeDoc.h"
int64_t SkPdfStructureElementAccessDictionary::StructParent(SkPdfNativeDoc* doc) {
SkPdfNativeObject* ret = get("StructParent", "");
if (doc) {ret = doc->resolveReference(ret);}
if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->intValue();
// TODO(edisonn): warn about missing default value for optional fields
return 0;
}
bool SkPdfStructureElementAccessDictionary::has_StructParent() const {
return get("StructParent", "") != NULL;
}
int64_t SkPdfStructureElementAccessDictionary::StructParents(SkPdfNativeDoc* doc) {
SkPdfNativeObject* ret = get("StructParents", "");
if (doc) {ret = doc->resolveReference(ret);}
if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->intValue();
// TODO(edisonn): warn about missing default value for optional fields
return 0;
}
bool SkPdfStructureElementAccessDictionary::has_StructParents() const {
return get("StructParents", "") != NULL;
}