|
CeresEngine 0.2.0
A game development framework
|
An interface that all data streams must implement. More...
#include <CeresEngine/Foundation/IO/Stream.hpp>
Additional Inherited Members | |
Public Types inherited from CeresEngine::IStream | |
| enum class | Seek { Start = SEEK_SET , Current = SEEK_CUR , End = SEEK_END } |
| An enumeration that describes how a data stream should be seeked. More... | |
Public Member Functions inherited from CeresEngine::IInputStream | |
| virtual bool | isReadable () const noexcept |
| Checks if the stream is readable. | |
| virtual size_t | read (void *data, size_t n) |
Reads data from the data stream to a buffer of raw memory data with length n. | |
| template<typename T > | |
| size_t | read (const MemoryView< T > &memoryView) |
| Reads data from the strea into a memory view. | |
| template<typename T > | |
| size_t | read (const StridedMemoryView< T > &memoryView) |
| Reads data from the stream into a strided memory view. | |
| Optional< String > | readString () |
Reads data from the buffer as a C++ String. | |
| template<typename T > requires std::is_trivially_copyable_v<T> | |
| Optional< T > | read () |
| Reads a trivially copyable obhect from the stream. | |
| virtual bool | invalidate () |
| In the stream is buffered, invalidates any buffered read data from the stream. | |
Public Member Functions inherited from CeresEngine::IStream | |
| IStream ()=default | |
| IStream (const IStream &) noexcept=delete | |
| IStream & | operator= (const IStream &) noexcept=delete |
| IStream (IStream &&) noexcept=default | |
| IStream & | operator= (IStream &&) noexcept=default |
| virtual | ~IStream () noexcept=default |
| virtual bool | isSeekable (Seek mode=Seek::Start) const noexcept |
| Checks if the stream is seekable. | |
| virtual void | seek (std::streamsize position, Seek mode=Seek::Start) |
| Changes the position of the data stream. | |
| void | skip (const size_t n) |
Skips n bytes from the data stream. | |
| virtual bool | isTellable () const noexcept |
| Checks if the stream knows it's current absolute position. | |
| virtual size_t | tell () |
| Gets the absolute stream position, in bytes. | |
| virtual bool | isSizeKnown () const noexcept |
| Checks if the stream knows the size of the data. | |
| virtual size_t | size () |
| Gets the number of bytes available on the stream. | |
Public Member Functions inherited from CeresEngine::IOutputStream | |
| virtual bool | isWritable () const noexcept |
| Checks if the stream is writable. | |
| virtual size_t | write (const void *data, size_t n) |
Writes data to the data stream from a buffer of raw memory data with length n. | |
| template<typename T > | |
| size_t | write (const MemoryView< const T > &memoryView) |
| Writes data from a memory view to the stream. | |
| template<typename T > | |
| size_t | write (const StridedMemoryView< const T > &memoryView) |
| Writes data from a strided memory view to the stream. | |
| size_t | writeString (const StringView string) |
| Writes a string to the data stream. | |
| template<typename T > requires std::is_trivially_copyable_v<T> | |
| bool | write (T value) |
| Writes a trivially copyable object to the stream. | |
| virtual bool | flush () |
| In the stream is buffered, invalidates any buffered write data from to stream. | |
An interface that all data streams must implement.