Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Array.h

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

Generated on Wed Nov 3 12:58:51 2004 for Lemur Toolkit by doxygen1.2.18