|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
Append-only chunk emission with size backpatching. More...
#include <wowlib/formats/common/chunked_file.hpp>
Public Member Functions | |
| ChunkWriter (FileBuffer &out) | |
| std::size_t | beginChunk (std::uint32_t fourcc) |
| Emit a chunk header with a placeholder size. | |
| void | endChunk (std::size_t sizeAt) |
| Backpatch the size of the chunk opened at sizeAt with the byte count appended since. | |
| void | append (const void *bytes, std::size_t n) |
| Append n raw bytes from bytes. | |
Append-only chunk emission with size backpatching.
Definition at line 353 of file chunked_file.hpp.
|
inlineexplicit |
| out | the buffer every emission appends to. |
Definition at line 356 of file chunked_file.hpp.
|
inline |
Append n raw bytes from bytes.
| bytes | the source. |
| n | the byte count. |
Definition at line 380 of file chunked_file.hpp.
Referenced by beginChunk(), wowlib::formats::detail::writeEntity(), and wowlib::formats::detail::writeValue().
|
inline |
Emit a chunk header with a placeholder size.
| fourcc | the chunk id, in disk layout. |
Definition at line 361 of file chunked_file.hpp.
References append(), and wowlib::formats::fourcc().
Referenced by wowlib::formats::detail::writeEntity().
|
inline |
Backpatch the size of the chunk opened at sizeAt with the byte count appended since.
| sizeAt | the value beginChunk() returned. |
Definition at line 372 of file chunked_file.hpp.
Referenced by wowlib::formats::detail::writeEntity().