1 //========================================================================
5 // Copyright 1996-2002 Glyph & Cog, LLC
7 //========================================================================
18 //------------------------------------------------------------------------
20 //------------------------------------------------------------------------
36 // Reference counting.
37 int incRef() { return ++ref
; }
38 int decRef() { return --ref
; }
40 // Get number of entries.
41 int getLength() { return length
; }
43 // Add an entry. NB: does not copy key.
44 void add(char *key
, Object
*val
);
46 // Check if dictionary is of specified type.
49 // Look up an entry and return the value. Returns a null object
50 // if <key> is not in the dictionary.
51 Object
*lookup(char *key
, Object
*obj
);
52 Object
*lookupNF(char *key
, Object
*obj
);
54 // Iterative accessors.
56 Object
*getVal(int i
, Object
*obj
);
57 Object
*getValNF(int i
, Object
*obj
);
59 // Set the xref pointer. This is only used in one special case: the
60 // trailer dictionary, which is read before the xref table is
62 void setXRef(XRef
*xrefA
) { xref
= xrefA
; }
66 XRef
*xref
; // the xref table for this PDF file
67 DictEntry
*entries
; // array of entries
68 int size
; // size of <entries> array
69 int length
; // number of entries in dictionary
70 int ref
; // reference count
72 DictEntry
*find(char *key
);