#include <StreamBuffer.h>
Should be replaced by connection points once they become available.
Public Member Functions | |
StreamBuffer (Name name) | |
~StreamBuffer () | |
string | as_string () const |
string | repr () const |
void | init_buffer (int tuple_size) |
Initialize the buffer of tuples. | |
void | reset_next () |
Reset the cursor to the beginning of the buffer. | |
void | buffer (const char *new_tuples, int length, int tuple_size) |
Buffer tuples produced on this stream. | |
bool | is_duplicate (string tuple) |
char * | first_new (char *buffer, int buffer_size) |
In a buffer partially filled with duplicates, finds the location of the last tuple in this.m_bin_tuples and returns a pointer to the first tuple following it Assumes the tuples in the buffer given as parameter have the same size as the tuples in our buffer. | |
ptr< StreamEvent > | all_tuples_since (string first_tuple=string()) |
Produces a StreamEvent from the content of the buffer Only take all tuples succeeding first_tuple. | |
ptr< StreamEvent > | all_tuples_before (string last_tuple=string()) |
Produces a StreamEvent from all tuples between m_begin and the tuple given in parameters. | |
ptr< StreamEvent > | next_tuples () |
Produces a StreamEvent from all tuples that were buffered since the last time we called buffer_next_end_as_event Advances m_next to m_end. | |
string | last_tuple () |
void | trim (string tuple) |
Trims queue iff finds a tuple identical to the one given as parameter. |
|
|
|
|
|
Produces a StreamEvent from all tuples between m_begin and the tuple given in parameters. If the tuple is not given or is not found then uses all tuples between m_begin and m_end |
|
Produces a StreamEvent from the content of the buffer Only take all tuples succeeding first_tuple. If first_tuple is not specified then return all the tuples in the buffer. If first_tuple is not in the buffer then return an empty set of tuples |
|
|
|
Buffer tuples produced on this stream.
|
|
In a buffer partially filled with duplicates, finds the location of the last tuple in this.m_bin_tuples and returns a pointer to the first tuple following it Assumes the tuples in the buffer given as parameter have the same size as the tuples in our buffer.
|
|
Initialize the buffer of tuples.
|
|
|
|
|
|
Produces a StreamEvent from all tuples that were buffered since the last time we called buffer_next_end_as_event Advances m_next to m_end.
|
|
|
|
Reset the cursor to the beginning of the buffer.
|
|
Trims queue iff finds a tuple identical to the one given as parameter. If not then does not do anything |