![]() |
PUMA Library Reference Manual
|
#include <Puma/Pipe.h>
Inheritance diagram for Puma::Pipe:Pipe between an input source and an output sink.
Public Member Functions | |
| Pipe (int buffer_size) | |
| Constructor. | |
| ~Pipe () | |
| Destructor. | |
| int | read (char *buffer, int n) |
| Read n bytes from the internal buffer into the given string buffer. | |
| int | write (const char *buffer, int n) |
| Write n bytes from the given buffer into the internal source buffer. | |
| int | free () |
| Get the number of bytes left in the internal buffer. | |
| bool | full () |
| Check if the internal buffer is full. | |
Public Member Functions inherited from Puma::Source | |
| Source () | |
| Constructs an empty source object. | |
| virtual | ~Source () |
| Destroys the source object. | |
| virtual int | size () |
| Get the size of the source. | |
Public Member Functions inherited from Puma::Sink | |
| virtual | ~Sink () |
| Destructor. | |
| Puma::Pipe::Pipe | ( | int | buffer_size | ) |
Constructor.
| buffer_size | Source buffer size. |
| Puma::Pipe::~Pipe | ( | ) |
Destructor.
| int Puma::Pipe::free | ( | ) |
Get the number of bytes left in the internal buffer.
|
inlinevirtual |
Check if the internal buffer is full.
Reimplemented from Puma::Sink.
|
virtual |
Read n bytes from the internal buffer into the given string buffer.
| buffer | The string used as buffer for the bytes read. |
| n | The number of bytes to read. |
Implements Puma::Source.
|
virtual |
Write n bytes from the given buffer into the internal source buffer.
| buffer | The bytes to write. |
| n | The number of bytes to write. |
Implements Puma::Sink.