2
//========================================================================
6
// Copyright 1996-2002 Glyph & Cog, LLC
8
//========================================================================
15
#ifdef USE_GCC_PRAGMAS
21
//------------------------------------------------------------------------
23
//------------------------------------------------------------------------
39
// Reference counting.
40
int incRef() { return ++ref; }
41
int decRef() { return --ref; }
43
// Get number of entries.
44
int getLength() { return length; }
46
// Add an entry. NB: does not copy key.
47
void add(char *key, Object *val);
49
// Check if dictionary is of specified type.
52
// Look up an entry and return the value. Returns a null object
53
// if <key> is not in the dictionary.
54
Object *lookup(char *key, Object *obj);
55
Object *lookupNF(char *key, Object *obj);
57
// Iterative accessors.
59
Object *getVal(int i, Object *obj);
60
Object *getValNF(int i, Object *obj);
62
// Set the xref pointer. This is only used in one special case: the
63
// trailer dictionary, which is read before the xref table is
65
void setXRef(XRef *xrefA) { xref = xrefA; }
69
XRef *xref; // the xref table for this PDF file
70
DictEntry *entries; // array of entries
71
int size; // size of <entries> array
72
int length; // number of entries in dictionary
73
int ref; // reference count
75
DictEntry *find(char *key);