1 //========================================================================
5 // Copyright 1996-2002 Glyph & Cog, LLC
7 //========================================================================
10 #pragma implementation
19 //------------------------------------------------------------------------
21 //------------------------------------------------------------------------
23 Array::Array(XRef *xrefA) {
33 for (i = 0; i < length; ++i)
38 void Array::add(Object *elem) {
39 if (length + 1 > size) {
41 elems = (Object *)grealloc(elems, size * sizeof(Object));
43 elems[length] = *elem;
47 Object *Array::get(int i, Object *obj) {
48 return elems[i].fetch(xref, obj);
51 Object *Array::getNF(int i, Object *obj) {
52 return elems[i].copy(obj);