|
CeresEngine 0.2.0
A game development framework
|
An interface that all asynchronous data streams must implement. More...
#include <CeresEngine/Foundation/IO/Stream.hpp>
Additional Inherited Members | |
Public Types inherited from CeresEngine::IAsyncStream | |
| using | Seek = IStream::Seek |
| An enumeration that describes how a data stream should be seeked. | |
Public Member Functions inherited from CeresEngine::IAsyncInputStream | |
| virtual bool | isReadable () const noexcept |
| Checks if the stream is readable. | |
| virtual Async< size_t > | read (void *data, size_t n) |
Reads data from the data stream to a buffer of raw memory data with length n. | |
| virtual Async< size_t > | readExactly (void *data, size_t n) |
Similar to read(void*, size_t), but ensures that the entire data buffer is filled with exactly n bytes or up to the end of the data stream. | |
Public Member Functions inherited from CeresEngine::IAsyncStream | |
| virtual | ~IAsyncStream ()=default |
| Default virtual destructor. | |
| virtual bool | isSeekable (Seek mode=Seek::Start) const noexcept |
| Checks if the stream is seekable. | |
| virtual Async | seek (std::streamsize position, Seek mode=Seek::Start) |
| Changes the position of the data stream. | |
| Async | skip (const size_t n) |
Skips n bytes from the data stream. | |
| virtual bool | isTellable () const noexcept |
| Checks if the stream knows the size of the data. | |
| virtual Async< size_t > | tell () |
| Gets the number of bytes available on the stream. | |
| virtual bool | isSizeKnown () const noexcept |
| Checks if the stream knows the size of the data. | |
| virtual Async< size_t > | size () |
| Gets the number of bytes available on the stream. | |
| virtual Async | wait ()=0 |
| Waits until all pending operations on the stream are complete. | |
Public Member Functions inherited from CeresEngine::IAsyncOutputStream | |
| virtual bool | isWritable () const noexcept |
| Checks if the stream is writable. | |
| virtual Async< size_t > | write (const void *data, size_t n) |
Writes data tp the data stream from a buffer of raw memory data with length n. | |
| virtual Async< size_t > | writeExactly (void *data, size_t n) |
Similar to write(const void*, size_t), but ensures that the entire data buffer is written with exactly n bytes or up to the end of the data stream. | |
An interface that all asynchronous data streams must implement.