aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bufferarray.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bufferarray.h')
-rw-r--r--lib/bufferarray.h21
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;