]>
git.ipfire.org Git - thirdparty/cups.git/blob - pdftops/Dict.h
1 //========================================================================
5 // Copyright 1996-2003 Glyph & Cog, LLC
7 //========================================================================
14 #ifdef USE_GCC_PRAGMAS
20 //------------------------------------------------------------------------
22 //------------------------------------------------------------------------
38 // Reference counting.
39 int incRef() { return ++ref
; }
40 int decRef() { return --ref
; }
42 // Get number of entries.
43 int getLength() { return length
; }
45 // Add an entry. NB: does not copy key.
46 void add(char *key
, Object
*val
);
48 // Check if dictionary is of specified type.
51 // Look up an entry and return the value. Returns a null object
52 // if <key> is not in the dictionary.
53 Object
*lookup(char *key
, Object
*obj
);
54 Object
*lookupNF(char *key
, Object
*obj
);
56 // Iterative accessors.
58 Object
*getVal(int i
, Object
*obj
);
59 Object
*getValNF(int i
, Object
*obj
);
61 // Set the xref pointer. This is only used in one special case: the
62 // trailer dictionary, which is read before the xref table is
64 void setXRef(XRef
*xrefA
) { xref
= xrefA
; }
68 XRef
*xref
; // the xref table for this PDF file
69 DictEntry
*entries
; // array of entries
70 int size
; // size of <entries> array
71 int length
; // number of entries in dictionary
72 int ref
; // reference count
74 DictEntry
*find(char *key
);