class Buffer

A rotating buffer implementation. More...

Definition#include <data-flow/include/Buffer.h>
InheritsObject
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Members


Detailed Description

A rotating buffer implementation. This buffer keeps the last N lines (frames) it has

mutable vector<ObjectRef> data

[protected]

Pointers to objects

mutable vector<int> flags

[protected]

int bufferLength

[protected]

The number N of objects kept

mutable int bufferPos

[protected]

mutable int currentPos

[protected]

 Buffer (int bLength) : data(bLength) , flags(bLength,0) , bufferLength (bLength)

Constructor, requires the buffer length (bLength)

 Buffer (const Buffer&)

Copy constructor (not implemented, do we need one?)

inline ObjectRefget (int ind)

[const]

Indexing operator, read-only

inline ObjectRefoperator[] (int ind)

Indexing operator, also sets the indexed frame as being the current frame

int  isValid (int ind)

[const]

void  printOn (ostream &out = cout)

[const]

Prints the Buffer

Reimplemented from Object.

int  getCurrentPos ()

inline ObjectRef &  operator[] (int ind)

inline ObjectRefget (int ind)

[const]

inline void  printOn (ostream &out)

[const]

Reimplemented from Object.

inline  Buffer (const Buffer&)


Generated by: jmvalin@usw-pr-shell2 on Mon Jun 24 00:06:36 2002, using kdoc 2.0a40.