Bringing apdf from vendor into main branch.
[AROS-Contrib.git] / apdf / xpdf / Array.h
blob20ae05f29707ba81e9a3f213609e17471947b755
1 //========================================================================
2 //
3 // Array.h
4 //
5 // Copyright 1996-2003 Glyph & Cog, LLC
6 //
7 //========================================================================
9 #ifndef ARRAY_H
10 #define ARRAY_H
12 #include <aconf.h>
14 #ifdef USE_GCC_PRAGMAS
15 #pragma interface
16 #endif
18 #include "Object.h"
20 class XRef;
22 //------------------------------------------------------------------------
23 // Array
24 //------------------------------------------------------------------------
26 class Array {
27 public:
29 // Constructor.
30 Array(XRef *xrefA);
32 // Destructor.
33 ~Array();
35 // Reference counting.
36 int incRef() { return ++ref; }
37 int decRef() { return --ref; }
39 // Get number of elements.
40 int getLength() { return length; }
42 // Add an element.
43 void add(Object *elem);
45 // Accessors.
46 Object *get(int i, Object *obj);
47 Object *getNF(int i, Object *obj);
49 private:
51 XRef *xref; // the xref table for this PDF file
52 Object *elems; // array of elements
53 int size; // size of <elems> array
54 int length; // number of elements in array
55 int ref; // reference count
58 #endif