![]() |
Gamedev Framework (gf)
0.10.0
A C++14 framework for 2D games
|
File based output stream. More...
#include <gf/Streams.h>

Public Types | |
| enum | Mode { Mode::Write, Mode::Append } |
| Open mode for the file. More... | |
Public Member Functions | |
| FileOutputStream (const Path &path, Mode mode=Mode::Write) | |
| Constructor. More... | |
| ~FileOutputStream () | |
| Destructor. More... | |
| virtual std::size_t | write (ArrayRef< uint8_t > buffer) override |
| Write data to the stream. More... | |
Public Member Functions inherited from gf::OutputStream | |
| OutputStream ()=default | |
| Default constructor. More... | |
| OutputStream (const InputStream &)=delete | |
| Deleted copy constructor. More... | |
| OutputStream & | operator= (const InputStream &)=delete |
| Deleted copy assignment. More... | |
| virtual | ~OutputStream () |
| Destructor. More... | |
| std::size_t | write (uint8_t byte) |
| Write a single byte to the stream. More... | |
File based output stream.
|
strong |
| gf::FileOutputStream::FileOutputStream | ( | const Path & | path, |
| Mode | mode = Mode::Write |
||
| ) |
Constructor.
The constructor opens the file. If the file is not opened, an exception is thrown.
| path | The path to the file |
| gf::FileOutputStream::~FileOutputStream | ( | ) |
Destructor.
The destructor closes the file.
|
overridevirtual |
Write data to the stream.
| buffer | The buffer to copy to the stream |
Implements gf::OutputStream.
1.8.13