From ab18114bfd38d4632c66401b5bc079241e27fab3 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Mon, 17 Jan 2000 11:49:41 +0000 Subject: Release of plptools-0.5 --- lib/bufferarray.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'lib/bufferarray.h') diff --git a/lib/bufferarray.h b/lib/bufferarray.h index 4cb948e..fbf26f1 100644 --- a/lib/bufferarray.h +++ b/lib/bufferarray.h @@ -9,12 +9,27 @@ class bufferArray { bufferArray(); bufferArray(const bufferArray &a); ~bufferArray(); - void operator =(const bufferArray &a); - + bufferArray &operator =(const bufferArray &a); bool empty() const; - bufferStore popBuffer(); + + // this is NOT a real push as with a FIFO but + // appends the bufferStore. void pushBuffer(const bufferStore& b); + bufferStore popBuffer(void); + + // new API (push() now behaves like a FIFO, more operators + bufferStore &operator [](const unsigned long index); + bufferArray &operator +(const bufferStore &); // append + bufferArray &operator +(const bufferArray &); // append + bufferArray &operator +=(const bufferStore &b); // append + bufferStore pop(void); + void push(const bufferStore& b); + void append(const bufferStore& b); + long length(void); + void clear(void); + private: + static const long ALLOC_MIN = 5; long len; long lenAllocd; bufferStore* buff; -- cgit v1.2.3