fixed windows access violation which occurs if one tries to retrieve
[swftools.git] / pdf2swf / xpdf / Array.h
bloba118f6852b01c9cb048fdbcc1dd06e32e2b94ec5
1 //========================================================================
2 //
3 // Array.h
4 //
5 // Copyright 1996-2002 Glyph & Cog, LLC
6 //
7 //========================================================================
9 #ifndef ARRAY_H
10 #define ARRAY_H
12 #ifdef __GNUC__
13 #pragma interface
14 #endif
16 #include "Object.h"
18 class XRef;
20 //------------------------------------------------------------------------
21 // Array
22 //------------------------------------------------------------------------
24 class Array {
25 public:
27 // Constructor.
28 Array(XRef *xrefA);
30 // Destructor.
31 ~Array();
33 // Reference counting.
34 int incRef() { return ++ref; }
35 int decRef() { return --ref; }
37 // Get number of elements.
38 int getLength() { return length; }
40 // Add an element.
41 void add(Object *elem);
43 // Accessors.
44 Object *get(int i, Object *obj);
45 Object *getNF(int i, Object *obj);
47 private:
49 XRef *xref; // the xref table for this PDF file
50 Object *elems; // array of elements
51 int size; // size of <elems> array
52 int length; // number of elements in array
53 int ref; // reference count
56 #endif