AUI Framework
master
Cross-platform base for C++ UI apps
|
An asynchronous buffer that converts an IInputStream to IOutputStream (and otherwise). More...
#include <AUI/IO/ADynamicPipe.h>
Public Member Functions# | |
void | write (const char *src, size_t size) override |
Writes exact size bytes to stream. Blocking (waiting for write all data) is allowed. | |
size_t | read (char *dst, size_t size) override |
Reads up to size bytes from stream. Blocking (waiting for new data) is allowed. | |
bool | empty () const noexcept |
![]() | |
size_t | read (std::span< std::byte > destination) |
Reads up to destination.size() bytes from stream. Blocking (waiting for new data) is allowed. | |
void | readExact (char *dst, size_t size) |
Reads exact size bytes from stream. Blocking (waiting for new data) is allowed. | |
template<typename T> | |
T | deserialize () |
template<typename T> | |
IInputStream & | operator>> (T &dst) |
template<typename T> | |
IInputStream & | operator>> (T &&dst) |
![]() | |
template<typename T> | |
void | write (const T &t) |
template<typename T> | |
IOutputStream & | operator<< (const T &t) |
ADynamicPipe is similar to the unix pipes. It's slower than APipe but it's capable to store any byte count.
Unlike APipe, ADynamicPipe never blocks the thread which can be useful in an asynchronous system.
|
overridevirtual |
dst | destination buffer |
size | destination buffer's size. > 0 |
Implements IInputStream.
|
overridevirtual |
src | source buffer |
size | source buffer's size. > 0 |
Implements IOutputStream.