AUI Framework  master
Cross-platform module-based framework for developing C++20 desktop applications
ARandomInputStream Class Reference

An input stream that generates random bytes. More...

Detailed Description

An input stream that generates random bytes.

Public Member Functions

 ARandomInputStream (size_t seed)
 
size_t read (char *dst, size_t size) override
 Reads up to size bytes from stream. Blocking (waiting for new data) is allowed. More...
 
- Public Member Functions inherited from IInputStream
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 >
deserialize ()
 
template<typename T >
IInputStreamoperator>> (T &dst)
 
template<typename T >
IInputStreamoperator>> (T &&dst)
 

Member Function Documentation

◆ read()

size_t ARandomInputStream::read ( char *  dst,
size_t  size 
)
overridevirtual

Reads up to size bytes from stream. Blocking (waiting for new data) is allowed.

Sneaky exceptions
An implementation can throw any exception that subclasses AIOException.
Parameters
dstdestination buffer
sizedestination buffer's size. > 0
Returns
number of read bytes (including 0)

Implements IInputStream.

#include <AUI/IO/ARandomInputStream.h>


The documentation for this class was generated from the following files:
Inheritance diagram for ARandomInputStream:
Collaboration diagram for ARandomInputStream: