The OpenD Programming Language

DataPipe

DataPipe is a pipeline of data processors, each accept some data, process it, and put result to next element in line. This class used to combine different Transfer- and Content- encodings. For example: unchunk transfer-encoding "chunnked", and uncompress Content-Encoding "gzip".

class DataPipe : DataPipeIface!E(
E
) {
DataPipeIface!(E)[] pipe;
Buffer!E buffer;
}

Members

Functions

empty
bool empty()

Test if internal buffer is empty

get
E[] get()

Get what was collected in internal buffer and clear it.

getNoCopy
E[][] getNoCopy()

get without datamove. but user receive [][]

insert
void insert(DataPipeIface!E p)

Append data processor to pipeline

putNoCopy
void putNoCopy(E[] data)

Process next data portion. Data passed over pipeline and store result in buffer.

Meta