i hope the node casts are correct here.
[AROS-Contrib.git] / arospdf / xpdf / Array.h
blob98519efaeee45d710f2437fc3bff6fc231c18ef3
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(xObject *elem);
45 // Accessors.
46 xObject *get(int i, xObject *obj);
47 xObject *getNF(int i, xObject *obj);
49 private:
51 XRef *xref; // the xref table for this PDF file
52 xObject *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