Abstract class used as an input stream source for an ExecPipe. More...
#include <stx-execpipe.h>
Public Member Functions | |
PipeSource () | |
Constructor which clears m_impl. | |
virtual bool | poll ()=0 |
Poll the input source for new data. | |
void | write (const void *data, unsigned int datalen) |
Write input data to the first stage via a buffer. | |
Private Attributes | |
class ExecPipeImpl * | m_impl |
pointer to associated pipe. filled by ExecPipe::add_input_source() | |
Friends | |
class | ExecPipeImpl |
association to the pipe implementation for write access to m_impl. |
Abstract class used as an input stream source for an ExecPipe.
Derived classes can be used in an ExecPipe to generate an input stream source. Data generated by this class is written to the first stage of the pipe.
When data is needed by the pipe the function poll() is called. This pure virtual function must generate data and push it into a buffer using the write() function. The input stream is terminated when poll() returns false.
Definition at line 43 of file stx-execpipe.h.
stx::PipeSource::PipeSource | ( | ) |
Constructor which clears m_impl.
Definition at line 1668 of file stx-execpipe.cc.
virtual bool stx::PipeSource::poll | ( | ) | [pure virtual] |
Poll the input source for new data.
The input stream is closed when this function returns false, otherwise it will be polled again.
void stx::PipeSource::write | ( | const void * | data, | |
unsigned int | datalen | |||
) |
Write input data to the first stage via a buffer.
Definition at line 1673 of file stx-execpipe.cc.
friend class ExecPipeImpl [friend] |
association to the pipe implementation for write access to m_impl.
Definition at line 50 of file stx-execpipe.h.
class ExecPipeImpl* stx::PipeSource::m_impl [private] |
pointer to associated pipe. filled by ExecPipe::add_input_source()
Definition at line 47 of file stx-execpipe.h.