21 void write(std::size_t numBytes,
const std::byte* bytes)
override;
23 void seekPut(std::size_t pos)
override;
24 std::optional<std::size_t>
tellPut()
override;
25 operator bool ()
const override;
44 std::unique_ptr<std::ostream> m_ostream;
51 *
this = std::move(other);
56 m_ostream = std::move(rhs.m_ostream);
60inline StdOutputStream::operator bool ()
const
62 return isStreamGoodForWrite();
67 return m_ostream.get();
72 return m_ostream !=
nullptr && m_ostream->good();
Definition IOutputStream.h:13
Definition StdOutputStream.h:15
StdOutputStream & operator=(StdOutputStream &&rhs) noexcept
Definition StdOutputStream.h:54
StdOutputStream()=default
std::string getReasonForError() const
A description for why the stream is not in a good state.
Definition StdOutputStream.cpp:98
void write(std::size_t numBytes, const std::byte *bytes) override
Write data in the form of raw bytes in one go. The method does not return before finishing the writin...
Definition StdOutputStream.cpp:26
std::optional< std::size_t > tellPut() override
Get the current output position of the stream. The unit of the position is defined by the implementat...
Definition StdOutputStream.cpp:76
void writeString(std::string_view str) override
Write a string in one go.
Definition StdOutputStream.cpp:44
void seekPut(std::size_t pos) override
Set the output position of the stream. The unit of the position is defined by the implementation.
Definition StdOutputStream.cpp:60
bool isStreamGoodForWrite() const
Definition StdOutputStream.h:70
void ensureStreamIsGoodForWrite() const
Check if the stream has any error.
Definition StdOutputStream.cpp:90
std::ostream * getStream() const
Definition StdOutputStream.h:65
The root for all renderer implementations.
Definition EEngineProject.h:6