--- parser3/src/main/Attic/pa_array.C 2001/02/21 11:19:20 1.15 +++ parser3/src/main/Attic/pa_array.C 2001/02/21 17:36:58 1.16 @@ -1,5 +1,5 @@ /* - $Id: pa_array.C,v 1.15 2001/02/21 11:19:20 paf Exp $ + $Id: pa_array.C,v 1.16 2001/02/21 17:36:58 paf Exp $ */ #include @@ -66,6 +66,29 @@ Array::Item *Array::get(int index) const return cache_chunk->rows[index-cache_chunk_base].item; } +void Array::put(int index, Item *item) { + if(!(index>=0 && index=cache_chunk_base && indexcount)) { + int count=cache_chunk->count; + cache_chunk_base+=count; + cache_chunk=cache_chunk->rows[count].link; + } + + cache_chunk->rows[index-cache_chunk_base].item=item; +} + Array& Array::append_array(const Array& src) { int src_used_rows=src.fused_rows; int last_chunk_rows_left=link_row-append_here;