|
CeresEngine 0.2.0
A game development framework
|
An output stream that allows writing data to be read by the paired PipeInputStream.
More...
#include <CeresEngine/Foundation/IO/Stream.Pipe.hpp>
Public Member Functions | |
| PipeOutputStream (PipeOutputStream &&) noexcept=default | |
| ~PipeOutputStream () noexcept | |
| bool | isWritable () const noexcept final |
| Checks if the stream is writable. | |
| size_t | write (const void *data, size_t n) final |
Writes data to the data stream from a buffer of raw memory data with length n. | |
| PipeStream (const PipeStream &)=delete | |
| PipeStream (PipeStream &&) noexcept | |
| bool | isSeekable (Seek mode=Seek::Start) const noexcept final |
| Checks if the stream is seekable. | |
| bool | isTellable () const noexcept final |
| Checks if the stream knows it's current absolute position. | |
| bool | isSizeKnown () const noexcept final |
| Checks if the stream knows the size of the data. | |
Public Member Functions inherited from CeresEngine::PipeStream | |
| PipeStream (const PipeStream &)=delete | |
| PipeStream & | operator= (const PipeStream &)=delete |
| PipeStream (PipeStream &&) noexcept | |
| PipeStream & | operator= (PipeStream &&) noexcept=delete |
| bool | isSeekable (Seek mode=Seek::Start) const noexcept final |
| Checks if the stream is seekable. | |
| bool | isTellable () const noexcept final |
| Checks if the stream knows it's current absolute position. | |
| bool | isSizeKnown () const noexcept final |
| Checks if the stream knows the size of the data. | |
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 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 size_t | tell () |
| Gets the absolute stream position, in bytes. | |
| virtual size_t | size () |
| Gets the number of bytes available on the stream. | |
Public Member Functions inherited from CeresEngine::IOutputStream | |
| 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. | |
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... | |
Static Public Member Functions inherited from CeresEngine::PipeStream | |
| static Pair< InputStream, OutputStream > | open () |
Opens a new pair of PipeInputStream and PipeOutputStream. | |
Protected Attributes inherited from CeresEngine::PipeStream | |
| SPtr< State > | mState |
An output stream that allows writing data to be read by the paired PipeInputStream.
|
defaultnoexcept |
|
noexcept |
|
inlinefinalvirtualnoexcept |
Checks if the stream is seekable.
If this method returns true, seek() is safe to be called on this stream.
Reimplemented from CeresEngine::IStream.
|
inlinefinalvirtualnoexcept |
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 from CeresEngine::IStream.
|
inlinefinalvirtualnoexcept |
Checks if the stream knows it's current absolute position.
If this method returns true, tell() is safe to be called on this stream.
Reimplemented from CeresEngine::IStream.
|
inlinefinalvirtualnoexcept |
Checks if the stream is writable.
If this method returns true, write() is safe to be called on this stream.
Reimplemented from CeresEngine::IOutputStream.
|
delete |
|
noexcept |
Writes data to the data stream from a buffer of raw memory data with length n.
isWritable() returns true.| data | The memory location to which written data should be copied from. |
| n | The maximum number of bytes to be write to the data stream. |
n, in that case the write operation must be repeated to ensure that all data was written. If 0, indicates that the stream has ended. Reimplemented from CeresEngine::IOutputStream.