aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/PdfViewer/SkPdfMultiMasterFontDictionary_autogen.h
blob: 3a9fc919640195ace0986aee51e18d1e32461e83 (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
#ifndef __DEFINED__SkPdfMultiMasterFontDictionary
#define __DEFINED__SkPdfMultiMasterFontDictionary

#include "SkPdfEnums_autogen.h"
#include "SkPdfArray_autogen.h"
#include "SkPdfType1FontDictionary_autogen.h"

class SkPdfMultiMasterFontDictionary : public SkPdfType1FontDictionary {
public:
  virtual SkPdfObjectType getType() const { return kMultiMasterFontDictionary_SkPdfObjectType;}
  virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kMultiMasterFontDictionary_SkPdfObjectType + 1);}
public:
  virtual SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() {return this;}
  virtual const SkPdfMultiMasterFontDictionary* asMultiMasterFontDictionary() const {return this;}

private:
  virtual SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() {return NULL;}
  virtual const SkPdfTrueTypeFontDictionary* asTrueTypeFontDictionary() const {return NULL;}

public:
private:
public:
  SkPdfMultiMasterFontDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfObject* podofoObj = NULL) : SkPdfType1FontDictionary(podofoDoc, podofoObj) {}

  virtual bool valid() const {return true;}

  SkPdfMultiMasterFontDictionary& operator=(const SkPdfMultiMasterFontDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}

  bool has_Subtype() const {
    return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", NULL));
  }

  std::string Subtype() const {
    std::string ret;
    if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "", &ret)) return ret;
    // TODO(edisonn): warn about missing required field, assert for known good pdfs
    return "";
  }

};

#endif  // __DEFINED__SkPdfMultiMasterFontDictionary