![]() |
MAGE
v0.171.0
Matthias Advanced Game Engine
|
#include <binary_writer.hpp>
Public Member Functions | |
BigEndianBinaryWriter & | operator= (const BigEndianBinaryWriter &writer)=delete |
BigEndianBinaryWriter & | operator= (BigEndianBinaryWriter &&writer) noexcept |
void | WriteToFile (std::filesystem::path path) |
Protected Member Functions | |
BigEndianBinaryWriter () | |
BigEndianBinaryWriter (const BigEndianBinaryWriter &writer)=delete | |
BigEndianBinaryWriter (BigEndianBinaryWriter &&writer) noexcept | |
~BigEndianBinaryWriter () | |
const std::filesystem::path & | GetPath () const noexcept |
template<typename T > | |
void | Write (const T &data) |
template<typename T > | |
void | WriteArray (gsl::span< const T > data) |
void | WriteCharacter (char c) |
void | WriteString (NotNull< const_zstring > str) |
Private Member Functions | |
virtual void | WriteData ()=0 |
Private Attributes | |
UniqueFileStream | m_file_stream |
std::filesystem::path | m_path |
A class of writers for writing (big endian) binary files.
|
protected |
Constructs a big endian binary writer.
|
protecteddelete |
Constructs a big endian binary writer from the given big endian binary writer.
[in] | writer | A reference to the big endian binary writer to copy. |
|
protecteddefaultnoexcept |
Constructs a big endian binary writer by moving the given big endian binary writer.
[in] | writer | A reference to the big endian binary writer to move. |
|
protecteddefault |
Destructs this big endian binary writer.
|
protectednoexcept |
Returns the current path of this big endian binary writer.
|
delete |
Copies the given big endian binary writer to this big endian binary writer.
[in] | writer | A reference to a big endian binary writer to copy. |
|
defaultnoexcept |
Moves the given big endian binary writer to this big endian binary writer.
[in] | writer | A reference to a big endian binary writer to move. |
|
protected |
Writes the given data.
T | The data type. |
[in] | data | A reference to the data. |
Exception | Failed to write the given data. |
|
protected |
Writes the given data array.
T | The data type. |
[in] | data | The data array. |
Exception | Failed to write the given data. |
|
protected |
Writes the given character.
[in] | c | The character to write. |
Exception | Failed to write the given character. |
|
privatepure virtual |
Starts writing.
Exception | Failed to write. |
Implemented in mage::rendering::loader::MSHWriter< VertexT, IndexT >.
|
protected |
Writes the given string.
[in] | str | A pointer to the first null-terminated byte string to write. |
Exception | Failed to write the given string. |
void mage::BigEndianBinaryWriter::WriteToFile | ( | std::filesystem::path | path | ) |
Writes to the file associated with the given path.
[in] | path | The path. |
Exception | Failed to write to the file. |
|
private |
A pointer to the file stream of this big endian binary writer.
|
private |
The current path of this big endian binary writer.