wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
wdc.hpp
Go to the documentation of this file.
1#pragma once
2
12
13#include <cstdint>
14#include <span>
15
17#include <wowlib/core/error.hpp>
18#include <wowlib/db/codec.hpp>
20
21namespace wowlib::db::wdc {
34 Result<void> readWdc(const TableInfo& info, std::span<const std::byte> data, RecordSink& sink, TableState& state);
35
51 Result<FileBuffer> writeWdc(std::uint32_t magic,
52 const TableInfo& info,
53 const RecordSource& source,
54 const TableState& state,
55 EncryptedPolicy policy);
56}
The owning byte buffer file contents are read into.
The type-erased boundary between the templated Table<Record> facade (table.hpp) and the per-format co...
The error-handling vocabulary: ErrorCode, Error and the Result<T> alias every fallible wowlib operati...
WdcImage — the structural parser of the WDC family (WDC1/WDC3/WDC4/WDC5) and the per-field value deco...
Result< void > readWdc(const TableInfo &info, std::span< const std::byte > data, RecordSink &sink, TableState &state)
Decode a WDC-family image onto the schema: every unencrypted section's records (inline fields via the...
Definition read.cpp:390
Result< FileBuffer > writeWdc(std::uint32_t magic, const TableInfo &info, const RecordSource &source, const TableState &state, EncryptedPolicy policy)
Encode a canonical image of flavor magic: one unencrypted section, integers bitpacked to their minimu...
Definition write.cpp:664
EncryptedPolicy
How write() treats a table that still holds keyless (undecryptable) encrypted sections.
Definition codec.hpp:33
std::expected< T, Error > Result
Every fallible wowlib operation returns Result<T>; bindings translate the error branch into a target-...
Definition error.hpp:100