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 "SkPdfAnnotationActionsDictionary_autogen.h"
9 #include "SkPdfNativeDoc.h"
10 
E(SkPdfNativeDoc * doc)11 SkPdfDictionary* SkPdfAnnotationActionsDictionary::E(SkPdfNativeDoc* doc) {
12   SkPdfNativeObject* ret = get("E", "");
13   if (doc) {ret = doc->resolveReference(ret);}
14   if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfDictionary*)ret;
15   // TODO(edisonn): warn about missing default value for optional fields
16   return NULL;
17 }
18 
has_E() const19 bool SkPdfAnnotationActionsDictionary::has_E() const {
20   return get("E", "") != NULL;
21 }
22 
X(SkPdfNativeDoc * doc)23 SkPdfDictionary* SkPdfAnnotationActionsDictionary::X(SkPdfNativeDoc* doc) {
24   SkPdfNativeObject* ret = get("X", "");
25   if (doc) {ret = doc->resolveReference(ret);}
26   if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfDictionary*)ret;
27   // TODO(edisonn): warn about missing default value for optional fields
28   return NULL;
29 }
30 
has_X() const31 bool SkPdfAnnotationActionsDictionary::has_X() const {
32   return get("X", "") != NULL;
33 }
34 
D(SkPdfNativeDoc * doc)35 SkPdfDictionary* SkPdfAnnotationActionsDictionary::D(SkPdfNativeDoc* doc) {
36   SkPdfNativeObject* ret = get("D", "");
37   if (doc) {ret = doc->resolveReference(ret);}
38   if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfDictionary*)ret;
39   // TODO(edisonn): warn about missing default value for optional fields
40   return NULL;
41 }
42 
has_D() const43 bool SkPdfAnnotationActionsDictionary::has_D() const {
44   return get("D", "") != NULL;
45 }
46 
U(SkPdfNativeDoc * doc)47 SkPdfDictionary* SkPdfAnnotationActionsDictionary::U(SkPdfNativeDoc* doc) {
48   SkPdfNativeObject* ret = get("U", "");
49   if (doc) {ret = doc->resolveReference(ret);}
50   if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfDictionary*)ret;
51   // TODO(edisonn): warn about missing default value for optional fields
52   return NULL;
53 }
54 
has_U() const55 bool SkPdfAnnotationActionsDictionary::has_U() const {
56   return get("U", "") != NULL;
57 }
58 
Fo(SkPdfNativeDoc * doc)59 SkPdfDictionary* SkPdfAnnotationActionsDictionary::Fo(SkPdfNativeDoc* doc) {
60   SkPdfNativeObject* ret = get("Fo", "");
61   if (doc) {ret = doc->resolveReference(ret);}
62   if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfDictionary*)ret;
63   // TODO(edisonn): warn about missing default value for optional fields
64   return NULL;
65 }
66 
has_Fo() const67 bool SkPdfAnnotationActionsDictionary::has_Fo() const {
68   return get("Fo", "") != NULL;
69 }
70 
Bl(SkPdfNativeDoc * doc)71 SkPdfDictionary* SkPdfAnnotationActionsDictionary::Bl(SkPdfNativeDoc* doc) {
72   SkPdfNativeObject* ret = get("Bl", "");
73   if (doc) {ret = doc->resolveReference(ret);}
74   if ((ret != NULL && ret->isDictionary()) || (doc == NULL && ret != NULL && ret->isReference())) return (SkPdfDictionary*)ret;
75   // TODO(edisonn): warn about missing default value for optional fields
76   return NULL;
77 }
78 
has_Bl() const79 bool SkPdfAnnotationActionsDictionary::has_Bl() const {
80   return get("Bl", "") != NULL;
81 }
82