Antkeeper
0.0.1
|
Provides access to a serialization state. More...
#include <physfs-serialize-context.hpp>
Public Member Functions | |
physfs_serialize_context (const std::filesystem::path &path) noexcept(false) | |
Constructs a PhysicsFS serialize context, opening a file using PhysicsFS and associating it with this serialize context. More... | |
physfs_serialize_context () noexcept=default | |
Constructs a PhysicsFS serialize context. More... | |
virtual | ~physfs_serialize_context () |
Destructs a PhysicsFS serialize context, internally closing a file using PhysicsFS. More... | |
void | open (const std::filesystem::path &path) noexcept(false) |
Opens a file using PhysicsFS and associates it with the serialize context. More... | |
void | close () noexcept |
Closes the associated file using PhysicsFS. More... | |
bool | is_open () const noexcept |
Returns true if the PhysicsFS file associated with this serialize context is open, false otherwise. More... | |
const std::filesystem::path & | path () const noexcept override |
Returns the path associated with this serialize context. More... | |
bool | error () const noexcept override |
Returns true if an error occured during a write operation or initialization, false otherwise. More... | |
std::size_t | write8 (const std::byte *data, std::size_t count) noexcept(false) override |
Writes 8-bit (byte) data. More... | |
std::size_t | write16_le (const std::byte *data, std::size_t count) noexcept(false) override |
Writes 16-bit (word) little-endian data. More... | |
std::size_t | write16_be (const std::byte *data, std::size_t count) noexcept(false) override |
Writes 16-bit (word) big-endian data. More... | |
std::size_t | write32_le (const std::byte *data, std::size_t count) noexcept(false) override |
Writes 32-bit (double word) little-endian data. More... | |
std::size_t | write32_be (const std::byte *data, std::size_t count) noexcept(false) override |
Writes 32-bit (double word) big-endian data. More... | |
std::size_t | write64_le (const std::byte *data, std::size_t count) noexcept(false) override |
Writes 64-bit (quad word) little-endian data. More... | |
std::size_t | write64_be (const std::byte *data, std::size_t count) noexcept(false) override |
Writes 64-bit (quad word) big-endian data. More... | |
![]() | |
template<std::endian Endian> | |
std::size_t | write16 (const std::byte *data, std::size_t count) noexcept(false) |
Writes 16-bit (word) data. More... | |
template<std::endian Endian> | |
std::size_t | write32 (const std::byte *data, std::size_t count) noexcept(false) |
Writes 32-bit (double word) data. More... | |
template<std::endian Endian> | |
std::size_t | write64 (const std::byte *data, std::size_t count) noexcept(false) |
Writes 64-bit (quad word) data. More... | |
Provides access to a serialization state.
Definition at line 30 of file physfs-serialize-context.hpp.
|
explicitnoexcept |
Constructs a PhysicsFS serialize context, opening a file using PhysicsFS and associating it with this serialize context.
path | Path to a file to open. |
serialize_error | File open error. |
Definition at line 23 of file physfs-serialize-context.cpp.
|
defaultnoexcept |
Constructs a PhysicsFS serialize context.
|
virtual |
Destructs a PhysicsFS serialize context, internally closing a file using PhysicsFS.
Definition at line 39 of file physfs-serialize-context.cpp.
|
noexcept |
Closes the associated file using PhysicsFS.
Definition at line 69 of file physfs-serialize-context.cpp.
|
overridevirtualnoexcept |
Returns true
if an error occured during a write operation or initialization, false
otherwise.
Implements serialize_context.
Definition at line 89 of file physfs-serialize-context.cpp.
|
noexcept |
Returns true
if the PhysicsFS file associated with this serialize context is open, false
otherwise.
Definition at line 79 of file physfs-serialize-context.cpp.
|
noexcept |
Opens a file using PhysicsFS and associates it with the serialize context.
path | Path to a file to open. |
serialize_error | File open error. |
Definition at line 47 of file physfs-serialize-context.cpp.
|
overridevirtualnoexcept |
Returns the path associated with this serialize context.
Implements serialize_context.
Definition at line 84 of file physfs-serialize-context.cpp.
|
overridevirtualnoexcept |
Writes 16-bit (word) big-endian data.
data | Pointer to data source. |
count | Number of words to write. |
serialize_error | Write error. |
Implements serialize_context.
Definition at line 134 of file physfs-serialize-context.cpp.
|
overridevirtualnoexcept |
Writes 16-bit (word) little-endian data.
data | Pointer to data source. |
count | Number of words to write. |
serialize_error | Write error. |
Implements serialize_context.
Definition at line 115 of file physfs-serialize-context.cpp.
|
overridevirtualnoexcept |
Writes 32-bit (double word) big-endian data.
data | Pointer to data source. |
count | Number of double words to write. |
serialize_error | Write error. |
Implements serialize_context.
Definition at line 172 of file physfs-serialize-context.cpp.
|
overridevirtualnoexcept |
Writes 32-bit (double word) little-endian data.
data | Pointer to data source. |
count | Number of double words to write. |
serialize_error | Write error. |
Implements serialize_context.
Definition at line 153 of file physfs-serialize-context.cpp.
|
overridevirtualnoexcept |
Writes 64-bit (quad word) big-endian data.
data | Pointer to data source. |
count | Number of quad words to write. |
serialize_error | Write error. |
Implements serialize_context.
Definition at line 210 of file physfs-serialize-context.cpp.
|
overridevirtualnoexcept |
Writes 64-bit (quad word) little-endian data.
data | Pointer to data source. |
count | Number of quad words to write. |
serialize_error | Write error. |
Implements serialize_context.
Definition at line 191 of file physfs-serialize-context.cpp.
|
overridevirtualnoexcept |
Writes 8-bit (byte) data.
data | Pointer to data source. |
count | Number of bytes to write. |
serialize_error | Write error. |
Implements serialize_context.
Definition at line 94 of file physfs-serialize-context.cpp.