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

Unified Diff: experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoundObjectDictionary_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/SkPdfSoundObjectDictionary_autogen.cpp
===================================================================
--- experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoundObjectDictionary_autogen.cpp (revision 0)
+++ experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfSoundObjectDictionary_autogen.cpp (revision 0)
@@ -0,0 +1,88 @@
+#include "SkPdfSoundObjectDictionary_autogen.h"
+
+
+#include "SkPdfNativeDoc.h"
+SkString SkPdfSoundObjectDictionary::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 SkPdfSoundObjectDictionary::has_Type() const {
+ return get("Type", "") != NULL;
+}
+
+double SkPdfSoundObjectDictionary::R(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("R", "");
+ 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 required field, assert for known good pdfs
+ return 0;
+}
+
+bool SkPdfSoundObjectDictionary::has_R() const {
+ return get("R", "") != NULL;
+}
+
+int64_t SkPdfSoundObjectDictionary::C(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("C", "");
+ 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 SkPdfSoundObjectDictionary::has_C() const {
+ return get("C", "") != NULL;
+}
+
+int64_t SkPdfSoundObjectDictionary::B(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("B", "");
+ 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 SkPdfSoundObjectDictionary::has_B() const {
+ return get("B", "") != NULL;
+}
+
+SkString SkPdfSoundObjectDictionary::E(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("E", "");
+ 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 SkPdfSoundObjectDictionary::has_E() const {
+ return get("E", "") != NULL;
+}
+
+SkString SkPdfSoundObjectDictionary::CO(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("CO", "");
+ 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 SkPdfSoundObjectDictionary::has_CO() const {
+ return get("CO", "") != NULL;
+}
+
+SkPdfNativeObject* SkPdfSoundObjectDictionary::CP(SkPdfNativeDoc* doc) {
+ SkPdfNativeObject* ret = get("CP", "");
+ if (doc) {ret = doc->resolveReference(ret);}
+ if ((ret != NULL && true) || (doc == NULL && ret != NULL && ret->isReference())) return ret;
+ // TODO(edisonn): warn about missing default value for optional fields
+ return NULL;
+}
+
+bool SkPdfSoundObjectDictionary::has_CP() const {
+ return get("CP", "") != NULL;
+}
+

Powered by Google App Engine
This is Rietveld 408576698