wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
wdbc.cpp File Reference

The WDBC codec (declarations in wdbc.hpp). More...

#include <wowlib/db/wdbc.hpp>
#include <cstring>
#include <format>
#include <string>
#include <unordered_map>
#include <wowlib/db/codec_detail.hpp>
Include dependency graph for wdbc.cpp:

Go to the source code of this file.

Namespaces

namespace  wowlib
namespace  wowlib::db

Functions

Result< void > wowlib::db::readWdbc (const TableInfo &info, std::span< const std::byte > data, RecordSink &sink, TableState &state)
 Decode a WDBC image: 20-byte header, fixed-stride records, string block.
Result< FileBuffer > wowlib::db::writeWdbc (const TableInfo &info, const RecordSource &source, const TableState &state)
 Encode a WDBC image; the string block preserves decoded offsets and appends new/changed strings (byte-perfect for an unmodified table).

Detailed Description

The WDBC codec (declarations in wdbc.hpp).

Non-templated: it walks the runtime schema and moves fields through the RecordSink / RecordSource, so the whole format lives in one compiled translation unit rather than one per generated table.

Definition in file wdbc.cpp.