Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Array.h

Go to the documentation of this file.
00001 //========================================================================
00002 //
00003 // Array.h
00004 //
00005 // Copyright 1996-2002 Glyph & Cog, LLC
00006 //
00007 //========================================================================
00008 
00009 #ifndef ARRAY_H
00010 #define ARRAY_H
00011 
00012 #ifdef __GNUC__
00013 #pragma interface
00014 #endif
00015 
00016 #include "Object.h"
00017 
00018 class XRef;
00019 
00020 //------------------------------------------------------------------------
00021 // Array
00022 //------------------------------------------------------------------------
00023 
00024 class Array {
00025 public:
00026 
00027   // Constructor.
00028   Array(XRef *xrefA);
00029 
00030   // Destructor.
00031   ~Array();
00032 
00033   // Reference counting.
00034   int incRef() { return ++ref; }
00035   int decRef() { return --ref; }
00036 
00037   // Get number of elements.
00038   int getLength() { return length; }
00039 
00040   // Add an element.
00041   void add(Object *elem);
00042 
00043   // Accessors.
00044   Object *get(int i, Object *obj);
00045   Object *getNF(int i, Object *obj);
00046 
00047 private:
00048 
00049   XRef *xref;                   // the xref table for this PDF file
00050   Object *elems;                // array of elements
00051   int size;                     // size of <elems> array
00052   int length;                   // number of elements in array
00053   int ref;                      // reference count
00054 };
00055 
00056 #endif

Generated on Sat Nov 5 16:18:12 2005 for OPIE by  doxygen 1.4.2