source: trunk/poppler/mypoppler/poppler/Array.h @ 2

Last change on this file since 2 was 2, checked in by Eugene Romanenko, 15 years ago

First import

File size: 1.1 KB
Line 
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#ifdef USE_GCC_PRAGMAS
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  GBool getString(int i, GooString *string);
47
48private:
49
50  XRef *xref;                   // the xref table for this PDF file
51  Object *elems;                // array of elements
52  int size;                     // size of <elems> array
53  int length;                   // number of elements in array
54  int ref;                      // reference count
55};
56
57#endif
Note: See TracBrowser for help on using the repository browser.