summaryrefslogtreecommitdiff
path: root/noncore/unsupported/qpdf/xpdf/Array.h
Unidiff
Diffstat (limited to 'noncore/unsupported/qpdf/xpdf/Array.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/qpdf/xpdf/Array.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/noncore/unsupported/qpdf/xpdf/Array.h b/noncore/unsupported/qpdf/xpdf/Array.h
new file mode 100644
index 0000000..1616fc3
--- a/dev/null
+++ b/noncore/unsupported/qpdf/xpdf/Array.h
@@ -0,0 +1,56 @@
1//========================================================================
2//
3// Array.h
4//
5// Copyright 1996 Derek B. Noonburg
6//
7//========================================================================
8
9#ifndef ARRAY_H
10#define ARRAY_H
11
12#ifdef __GNUC__
13#pragma interface
14#endif
15
16#include "Object.h"
17
18class XRef;
19
20//------------------------------------------------------------------------
21// Array
22//------------------------------------------------------------------------
23
24class Array {
25public:
26
27 // Constructor.
28 Array(XRef *xrefA);
29
30 // Destructor.
31 ~Array();
32
33 // Reference counting.
34 int incRef() { return ++ref; }
35 int decRef() { return --ref; }
36
37 // Get number of elements.
38 int getLength() { return length; }
39
40 // Add an element.
41 void add(Object *elem);
42
43 // Accessors.
44 Object *get(int i, Object *obj);
45 Object *getNF(int i, Object *obj);
46
47private:
48
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
54};
55
56#endif