|
CeresEngine 0.2.0
A game development framework
|
#include <CeresEngine/Foundation/IO/Stream.hpp>
Public Types | |
| using | Seek = IStream::Seek |
| An enumeration that describes how a data stream should be seeked. | |
Public Member Functions | |
| 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. | |
An enumeration that describes how a data stream should be seeked.
|
virtualdefault |
Default virtual destructor.
|
inlinevirtualnoexcept |
Checks if the stream is seekable.
If this method returns true, seek() is safe to be called on this stream.
Reimplemented in CeresEngine::SyncDataStreamAdapter.
Checks if the stream knows the size of the data.
If this method returns true, size() is safe to be called on this stream.
Reimplemented in CeresEngine::SyncDataStreamAdapter.
Checks if the stream knows the size of the data.
If this method returns true, tell() is safe to be called on this stream.
Reimplemented in CeresEngine::SyncDataStreamAdapter.
|
virtual |
Changes the position of the data stream.
isSeekable() returns true.| position | The position to set the data stream to. |
| mode | The mode to change the data stream position. |
Reimplemented in CeresEngine::SyncDataStreamAdapter.
Gets the number of bytes available on the stream.
isSizeKnown() returns true. Reimplemented in CeresEngine::SyncDataStreamAdapter.
Gets the number of bytes available on the stream.
isTellable() returns true. Reimplemented in CeresEngine::SyncDataStreamAdapter.
Waits until all pending operations on the stream are complete.
Implemented in CeresEngine::SyncDataStreamAdapter.