Antkeeper
0.0.1
|
Provides access to a deserialization state. More...
#include <deserialize-context.hpp>
Public Member Functions | |
virtual const std::filesystem::path & | path () const noexcept=0 |
Returns the path associated with this deserialize context. More... | |
virtual bool | error () const noexcept=0 |
Returns true if an error occured during a read operation or initialization, false otherwise. More... | |
virtual bool | eof () const noexcept=0 |
Returns true if the end of a file was reached. More... | |
virtual std::size_t | size () const noexcept=0 |
Returns the size of the file, in bytes. More... | |
virtual std::size_t | tell () const =0 |
Returns the offsets from the start of the file to the current position, in bytes. More... | |
virtual void | seek (std::size_t offset)=0 |
Seeks to a position in the file. More... | |
virtual std::size_t | read8 (std::byte *data, std::size_t count) noexcept(false)=0 |
Reads 8-bit (byte) data. More... | |
virtual std::size_t | read16_le (std::byte *data, std::size_t count) noexcept(false)=0 |
Reads 16-bit (word) little-endian data. More... | |
virtual std::size_t | read16_be (std::byte *data, std::size_t count) noexcept(false)=0 |
Reads 16-bit (word) big-endian data. More... | |
template<std::endian Endian> | |
std::size_t | read16 (std::byte *data, std::size_t count) noexcept(false) |
Reads 16-bit (word) data. More... | |
virtual std::size_t | read32_le (std::byte *data, std::size_t count) noexcept(false)=0 |
Reads 32-bit (double word) little-endian data. More... | |
virtual std::size_t | read32_be (std::byte *data, std::size_t count) noexcept(false)=0 |
Reads 32-bit (double word) big-endian data. More... | |
template<std::endian Endian> | |
std::size_t | read32 (std::byte *data, std::size_t count) noexcept(false) |
Reads 32-bit (double word) data. More... | |
virtual std::size_t | read64_le (std::byte *data, std::size_t count) noexcept(false)=0 |
Reads 64-bit (quad word) little-endian data. More... | |
virtual std::size_t | read64_be (std::byte *data, std::size_t count) noexcept(false)=0 |
Reads 64-bit (quad word) big-endian data. More... | |
template<std::endian Endian> | |
std::size_t | read64 (std::byte *data, std::size_t count) noexcept(false) |
Reads 64-bit (quad word) data. More... | |
Provides access to a deserialization state.
Definition at line 30 of file deserialize-context.hpp.
|
pure virtualnoexcept |
Returns true
if the end of a file was reached.
Implemented in physfs_deserialize_context.
|
pure virtualnoexcept |
Returns true
if an error occured during a read operation or initialization, false
otherwise.
Implemented in physfs_deserialize_context.
|
pure virtualnoexcept |
Returns the path associated with this deserialize context.
Implemented in physfs_deserialize_context.
|
inlinenoexcept |
Reads 16-bit (word) data.
Endian | Endianness of the read operation. |
[out] | data | Pointer to data destination. |
[in] | count | Number of words to read. |
deserialize_error | Read error. |
Definition at line 118 of file deserialize-context.hpp.
|
pure virtualnoexcept |
Reads 16-bit (word) big-endian data.
[out] | data | Pointer to data destination. |
[in] | count | Number of words to read. |
deserialize_error | Read error. |
Implemented in physfs_deserialize_context.
|
pure virtualnoexcept |
Reads 16-bit (word) little-endian data.
[out] | data | Pointer to data destination. |
[in] | count | Number of words to read. |
deserialize_error | Read error. |
Implemented in physfs_deserialize_context.
|
inlinenoexcept |
Reads 32-bit (double word) data.
Endian | Endianness of the read operation. |
[out] | data | Pointer to data destination. |
[in] | count | Number of double words to read. |
deserialize_error | Read error. |
Definition at line 167 of file deserialize-context.hpp.
|
pure virtualnoexcept |
Reads 32-bit (double word) big-endian data.
[out] | data | Pointer to data destination. |
[in] | count | Number of double words to read. |
deserialize_error | Read error. |
Implemented in physfs_deserialize_context.
|
pure virtualnoexcept |
Reads 32-bit (double word) little-endian data.
[out] | data | Pointer to data destination. |
[in] | count | Number of double words to read. |
deserialize_error | Read error. |
Implemented in physfs_deserialize_context.
|
inlinenoexcept |
Reads 64-bit (quad word) data.
Endian | Endianness of the read operation. |
[out] | data | Pointer to data destination. |
[in] | count | Number of quad words to read. |
deserialize_error | Read error. |
Definition at line 216 of file deserialize-context.hpp.
|
pure virtualnoexcept |
Reads 64-bit (quad word) big-endian data.
[out] | data | Pointer to data destination. |
[in] | count | Number of quad words to read. |
deserialize_error | Read error. |
Implemented in physfs_deserialize_context.
|
pure virtualnoexcept |
Reads 64-bit (quad word) little-endian data.
[out] | data | Pointer to data destination. |
[in] | count | Number of quad words to read. |
deserialize_error | Read error. |
Implemented in physfs_deserialize_context.
|
pure virtualnoexcept |
Reads 8-bit (byte) data.
[out] | data | Pointer to data destination. |
[in] | count | Number of bytes to read. |
deserialize_error | Read error. |
Implemented in physfs_deserialize_context.
|
pure virtual |
Seeks to a position in the file.
offset | Offset from the start of the file, in bytes. |
deserialize_error | Seek error. |
Implemented in physfs_deserialize_context.
|
pure virtualnoexcept |
Returns the size of the file, in bytes.
Implemented in physfs_deserialize_context.
|
pure virtual |
Returns the offsets from the start of the file to the current position, in bytes.
deserialize_error | Tell error. |
Implemented in physfs_deserialize_context.