--- parser3/src/include/pa_array.h 2001/01/27 15:45:24 1.3 +++ parser3/src/include/pa_array.h 2001/01/29 12:00:45 1.6 @@ -1,5 +1,5 @@ /* - $Id: pa_array.h,v 1.3 2001/01/27 15:45:24 paf Exp $ + $Id: pa_array.h,v 1.6 2001/01/29 12:00:45 paf Exp $ */ /* @@ -33,6 +33,13 @@ public: CR_GROW_PERCENT=60 }; +public: + + int size() { return fused_rows; } + Array& operator += (Item src); + Item& operator [] (int index); + Array& operator += (Array& src); + private: friend Pool; @@ -50,6 +57,10 @@ private: } *head; // the head chunk of the chunk chain + // last allocated chunk + // helps appending Arrays + Chunk *tail; + // next append would write to this record Chunk::Row *append_here; @@ -58,9 +69,6 @@ private: Chunk::Row *link_row; private: - // last chank allocated count - int curr_chunk_rows; - // array size int fused_rows; @@ -83,18 +91,7 @@ private: bool chunk_is_full() { return append_here == link_row; } - void expand(); - -public: - - int size() { return fused_rows; } - Array& operator += (Item src); - - /* - void put(int index, Item item); - Item get(int index); - */ - Item& operator [] (int index); + void expand(int chunk_rows); private: //disabled