diff options
author | Fritz Elfert <felfert@to.com> | 2000-01-17 11:49:41 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2000-01-17 11:49:41 +0000 |
commit | ab18114bfd38d4632c66401b5bc079241e27fab3 (patch) | |
tree | 14f9c1d5f020cf8ed2f205094ca9e2fc907bb969 /lib/bufferarray.h | |
parent | 6eceb82662300bf306e70bd943200665bc3c9bc3 (diff) | |
download | plptools-ab18114bfd38d4632c66401b5bc079241e27fab3.tar.gz plptools-ab18114bfd38d4632c66401b5bc079241e27fab3.tar.bz2 plptools-ab18114bfd38d4632c66401b5bc079241e27fab3.zip |
Release of plptools-0.5
Diffstat (limited to 'lib/bufferarray.h')
-rw-r--r-- | lib/bufferarray.h | 21 |
1 files changed, 18 insertions, 3 deletions
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; |