aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/PdfViewer/pdfparser/native/pdfapi/SkPdfType0FunctionDictionary_autogen.cpp
blob: ea4888b80762020661a0beb7cba67776696df2c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
 * Copyright 2013 Google Inc.

 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "SkPdfType0FunctionDictionary_autogen.h"
#include "SkPdfNativeDoc.h"

SkPdfArray* SkPdfType0FunctionDictionary::Size(SkPdfNativeDoc* doc) {
  SkPdfNativeObject* ret = get("Size", "");
  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 required field, assert for known good pdfs
  return NULL;
}

bool SkPdfType0FunctionDictionary::has_Size() const {
  return get("Size", "") != NULL;
}

int64_t SkPdfType0FunctionDictionary::BitsPerSample(SkPdfNativeDoc* doc) {
  SkPdfNativeObject* ret = get("BitsPerSample", "");
  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 SkPdfType0FunctionDictionary::has_BitsPerSample() const {
  return get("BitsPerSample", "") != NULL;
}

int64_t SkPdfType0FunctionDictionary::Order(SkPdfNativeDoc* doc) {
  SkPdfNativeObject* ret = get("Order", "");
  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 SkPdfType0FunctionDictionary::has_Order() const {
  return get("Order", "") != NULL;
}

SkPdfArray* SkPdfType0FunctionDictionary::Encode(SkPdfNativeDoc* doc) {
  SkPdfNativeObject* ret = get("Encode", "");
  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 SkPdfType0FunctionDictionary::has_Encode() const {
  return get("Encode", "") != NULL;
}

SkPdfArray* SkPdfType0FunctionDictionary::Decode(SkPdfNativeDoc* doc) {
  SkPdfNativeObject* ret = get("Decode", "");
  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 SkPdfType0FunctionDictionary::has_Decode() const {
  return get("Decode", "") != NULL;
}