]> git.ipfire.org Git - thirdparty/cups.git/blame - pdftops/Array.h
Load cups into easysw/current.
[thirdparty/cups.git] / pdftops / Array.h
CommitLineData
ef416fc2 1//========================================================================
2//
3// Array.h
4//
5// Copyright 1996-2003 Glyph & Cog, LLC
6//
7//========================================================================
8
9#ifndef ARRAY_H
10#define ARRAY_H
11
12#include <config.h>
13
14#ifdef USE_GCC_PRAGMAS
15#pragma interface
16#endif
17
18#include "Object.h"
19
20class XRef;
21
22//------------------------------------------------------------------------
23// Array
24//------------------------------------------------------------------------
25
26class Array {
27public:
28
29 // Constructor.
30 Array(XRef *xrefA);
31
32 // Destructor.
33 ~Array();
34
35 // Reference counting.
36 int incRef() { return ++ref; }
37 int decRef() { return --ref; }
38
39 // Get number of elements.
40 int getLength() { return length; }
41
42 // Add an element.
43 void add(Object *elem);
44
45 // Accessors.
46 Object *get(int i, Object *obj);
47 Object *getNF(int i, Object *obj);
48
49private:
50
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
56};
57
58#endif