![]() |
Gamedev Framework (gf) 1.2.0
A C++17 framework for 2D games
|
Abstract class for custom file output streams. More...
#include <gf/Stream.h>
Public Member Functions | |
OutputStream ()=default | |
Default constructor. More... | |
OutputStream (const OutputStream &)=delete | |
Deleted copy constructor. More... | |
OutputStream & | operator= (const OutputStream &)=delete |
Deleted copy assignment. More... | |
virtual | ~OutputStream () |
Destructor. More... | |
virtual std::size_t | write (Span< const uint8_t > buffer)=0 |
Write data to the stream. More... | |
std::size_t | write (uint8_t byte) |
Write a single byte to the stream. More... | |
virtual std::size_t | getWrittenBytesCount () const =0 |
Get the number of bytes already written. More... | |
Abstract class for custom file output streams.
This class allows users to define their own stream output sinks to which Gamedev Framework can save resources.
|
default |
Default constructor.
|
delete |
Deleted copy constructor.
|
virtual |
Destructor.
|
pure virtual |
Get the number of bytes already written.
This function returns the number of bytes actually written i.e. it does not take into account possible bytes that have not been flushed yet.
Implemented in gf::FileOutputStream, gf::MemoryOutputStream, gf::CompressedOutputStream, and gf::BufferOutputStream.
|
delete |
Deleted copy assignment.
|
pure virtual |
Write data to the stream.
buffer | The buffer to copy to the stream |
Implemented in gf::FileOutputStream, gf::MemoryOutputStream, gf::CompressedOutputStream, and gf::BufferOutputStream.
|
inline |
Write a single byte to the stream.
byte | The byte to copy to the stream |