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

Table<Record> — the typed client-database facade over the non-templated TableCore engine (table_core.hpp). More...

#include <cstddef>
#include <cstdint>
#include <span>
#include <string_view>
#include <vector>
#include <welder/vocabulary.hpp>
#include <wowlib/core/buffer.hpp>
#include <wowlib/core/client_version.hpp>
#include <wowlib/core/error.hpp>
#include <wowlib/core/file_key.hpp>
#include <wowlib/db/codec.hpp>
#include <wowlib/db/record_bridge.hpp>
#include <wowlib/db/schema.hpp>
#include <wowlib/db/table_core.hpp>
#include <wowlib/formats/common/string_block.hpp>
#include <wowlib/formats/common/validation.hpp>
#include <wowlib/fs/filesystem.hpp>
Include dependency graph for table.hpp:

Go to the source code of this file.

Classes

class  wowlib::db::Table< Record >
 A client database table: the typed records of one DBFilesClient file. More...

Namespaces

namespace  wowlib
namespace  wowlib::db

Detailed Description

Table<Record> — the typed client-database facade over the non-templated TableCore engine (table_core.hpp).

The record type pins the client version and the table identity, so Table<MapRecord<V>> IS the Map table of client V; everything the table DOES lives in the core, compiled once — this template contributes only the typed records vector, the consteval identity, and one-line delegations.

The dbdgen-generated table classes do NOT use this template: they derive the welded TableBase chain (so the method surface binds once for all ~4200 of them) and _wire the same core themselves. This facade is the hand-written C++ path — a record struct you write yourself gets the full engine by naming this one type.

Round-trip policy (plan of record, 2026-07-29): WDBC and WDB2 are byte-perfect (the string block preserves decoded offsets); WDC writes are canonical re-encodes with the semantic guarantee (write -> re-read decodes to identical values). Encrypted sections always pass through verbatim.

Definition in file table.hpp.