Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1132)

Unified Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStreamCommonDictionary_autogen.cpp

Issue 22900010: pdfviewer: check in pdfapi classes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStreamCommonDictionary_autogen.cpp
===================================================================
--- experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStreamCommonDictionary_autogen.cpp (revision 0)
+++ experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfStreamCommonDictionary_autogen.cpp (revision 0)
@@ -0,0 +1,156 @@
+#include "SkPdfStreamCommonDictionary_autogen.h"
+
+
+#include "SkPdfNativeDoc.h"
+int64_t SkPdfStreamCommonDictionary::Length(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("Length", "");
+ 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 required field, assert for known good pdfs
+ return 0;
+}
+
+bool SkPdfStreamCommonDictionary::has_Length() const {
+ return get("Length", "") != NULL;
+}
+
+bool SkPdfStreamCommonDictionary::isFilterAName(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("Filter", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ return ret != NULL && ret->isName();
+}
+
+SkString SkPdfStreamCommonDictionary::getFilterAsName(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("Filter", "");
+ 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 SkPdfStreamCommonDictionary::isFilterAArray(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("Filter", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ return ret != NULL && ret->isArray();
+}
+
+SkPdfArray* SkPdfStreamCommonDictionary::getFilterAsArray(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("Filter", "");
+ 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 SkPdfStreamCommonDictionary::has_Filter() const {
+ return get("Filter", "") != NULL;
+}
+
+bool SkPdfStreamCommonDictionary::isDecodeParmsADictionary(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("DecodeParms", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ return ret != NULL && ret->isDictionary();
+}
+
+SkPdfDictionary* SkPdfStreamCommonDictionary::getDecodeParmsAsDictionary(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("DecodeParms", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfDictionary*)ret;
+ // TODO(edisonn): warn about missing default value for optional fields
+ return NULL;
+}
+
+bool SkPdfStreamCommonDictionary::isDecodeParmsAArray(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("DecodeParms", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ return ret != NULL && ret->isArray();
+}
+
+SkPdfArray* SkPdfStreamCommonDictionary::getDecodeParmsAsArray(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("DecodeParms", "");
+ 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 SkPdfStreamCommonDictionary::has_DecodeParms() const {
+ return get("DecodeParms", "") != NULL;
+}
+
+SkPdfFileSpec SkPdfStreamCommonDictionary::F(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("F", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ if ((ret != NULL && false) || (doc == NULL && ret != NULL && ret->isReference())) return ret->fileSpecValue();
+ // TODO(edisonn): warn about missing default value for optional fields
+ return SkPdfFileSpec();
+}
+
+bool SkPdfStreamCommonDictionary::has_F() const {
+ return get("F", "") != NULL;
+}
+
+bool SkPdfStreamCommonDictionary::isFFilterAName(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("FFilter", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ return ret != NULL && ret->isName();
+}
+
+SkString SkPdfStreamCommonDictionary::getFFilterAsName(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("FFilter", "");
+ 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 SkPdfStreamCommonDictionary::isFFilterAArray(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("FFilter", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ return ret != NULL && ret->isArray();
+}
+
+SkPdfArray* SkPdfStreamCommonDictionary::getFFilterAsArray(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("FFilter", "");
+ 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 SkPdfStreamCommonDictionary::has_FFilter() const {
+ return get("FFilter", "") != NULL;
+}
+
+bool SkPdfStreamCommonDictionary::isFDecodeParmsADictionary(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("FDecodeParms", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ return ret != NULL && ret->isDictionary();
+}
+
+SkPdfDictionary* SkPdfStreamCommonDictionary::getFDecodeParmsAsDictionary(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("FDecodeParms", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfDictionary*)ret;
+ // TODO(edisonn): warn about missing default value for optional fields
+ return NULL;
+}
+
+bool SkPdfStreamCommonDictionary::isFDecodeParmsAArray(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("FDecodeParms", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ return ret != NULL && ret->isArray();
+}
+
+SkPdfArray* SkPdfStreamCommonDictionary::getFDecodeParmsAsArray(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("FDecodeParms", "");
+ 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 SkPdfStreamCommonDictionary::has_FDecodeParms() const {
+ return get("FDecodeParms", "") != NULL;
+}
+

Powered by Google App Engine
This is Rietveld 408576698