author | sandman <sandman> | 2002-04-13 00:47:20 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-04-13 00:47:20 (UTC) |
commit | 98a1e3f36567639344f12932b629e526a8783aa8 (patch) (unidiff) | |
tree | 0433d296857faceeafc54f7deabddb621f45a933 /noncore/unsupported/qpdf/xpdf/Array.h | |
parent | 7e31b1fba119f69929d6744d7295555ff1727f4f (diff) | |
download | opie-98a1e3f36567639344f12932b629e526a8783aa8.zip opie-98a1e3f36567639344f12932b629e526a8783aa8.tar.gz opie-98a1e3f36567639344f12932b629e526a8783aa8.tar.bz2 |
CVS import of QPdf
Diffstat (limited to 'noncore/unsupported/qpdf/xpdf/Array.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/qpdf/xpdf/Array.h | 56 |
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 | |||
18 | class XRef; | ||
19 | |||
20 | //------------------------------------------------------------------------ | ||
21 | // Array | ||
22 | //------------------------------------------------------------------------ | ||
23 | |||
24 | class Array { | ||
25 | public: | ||
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 | |||
47 | private: | ||
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 | ||