AUI Framework
develop
Cross-platform base for C++ UI apps
|
Represents an input stream. More...
#include <AUI/IO/IInputStream.h>
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. | |
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) |
Represents an input stream.
|
inline |
Reads data using AUI serialization (see AUI/Traits/serializable.h)
IInputStream & IInputStream::operator>> | ( | T && | dst | ) |
Reads data using AUI serialization (see AUI/Traits/serializable.h)
dst | value to write |
IInputStream & IInputStream::operator>> | ( | T & | dst | ) |
Reads data using AUI serialization (see AUI/Traits/serializable.h)
dst | 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, ATcpSocket, and PipeInputStream.
|
inline |
Reads up to destination.size()
bytes from stream. Blocking (waiting for new data) is allowed.
destination | destination buffer |
|
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. |