AUI Framework
master
Cross-platform module-based framework for developing C++20 desktop applications
|
Represents an input stream. More...
Represents an input stream.
Public Member Functions | |
virtual size_t | read (char *dst, size_t size)=0 |
Reads up to size bytes from stream. Blocking (waiting for new data) is allowed. More... | |
size_t | read (std::span< std::byte > destination) |
Reads up to destination.size() bytes from stream. Blocking (waiting for new data) is allowed. More... | |
void | readExact (char *dst, size_t size) |
Reads exact size bytes from stream. Blocking (waiting for new data) is allowed. More... | |
template<typename T > | |
T | deserialize () |
template<typename T > | |
IInputStream & | operator>> (T &dst) |
template<typename T > | |
IInputStream & | operator>> (T &&dst) |
|
inline |
Reads data using AUI serialization (see AUI/Traits/serializable.h)
t | value to write |
IInputStream & IInputStream::operator>> | ( | T && | dst | ) |
Reads data using AUI serialization (see AUI/Traits/serializable.h)
t | value to write |
IInputStream & IInputStream::operator>> | ( | T & | dst | ) |
Reads data using AUI serialization (see AUI/Traits/serializable.h)
t | value to write |
|
pure virtual |
Reads up to size
bytes from stream. Blocking (waiting for new data) is allowed.
dst | destination buffer |
size | destination buffer's size. > 0 |
Implemented in AByteBufferInputStream, AConcatInputStream, ADynamicPipe, AFileInputStream, ALimitedInputStream, APipe, ARandomInputStream, AStringStream, AStrongByteBufferInputStream, PipeInputStream, and ATcpSocket.
|
inline |
Reads up to destination.size()
bytes from stream. Blocking (waiting for new data) is allowed.
dst | destination buffer |
size | destination buffer's size. > 0 |
|
inline |
Reads exact size
bytes from stream. Blocking (waiting for new data) is allowed.
Throws | AEOFException when could not read EXACT size bytes. |
dst | destination buffer. |
size | destination buffer's size. |
#include <AUI/IO/IInputStream.h>