|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
A client database table: the typed records of one DBFilesClient file. More...
#include <wowlib/db/table.hpp>
Public Member Functions | |
| Table () | |
| Table (const Table &o) | |
| Table (Table &&o) noexcept | |
| Table & | operator= (const Table &o) |
| Table & | operator= (Table &&o) noexcept |
| Result< void > | read (std::span< const std::byte > data) |
| Decode a table image. | |
| Result< void > | read (fs::FileSystem &fs, const FileKey &key) |
| Load the table from a client filesystem. | |
| Result< FileBuffer > | write (EncryptedPolicy policy=EncryptedPolicy::Preserve) const |
| Serialize the table. | |
| Result< void > | write (fs::FileSystem &fs, const FileKey &key, EncryptedPolicy policy=EncryptedPolicy::Preserve) const |
| Serialize the table into a client filesystem (project overlay). | |
| const formats::StringBlock & | strings () const |
| The preserved string block the record string fields were decoded from. | |
| const std::vector< EncryptedSection > & | encryptedSections () const |
| The encrypted sections skipped on the last read (empty when the file was fully decodable or is not a WDC format). | |
| bool | fullyDecoded () const |
| Whether every record of the file was decoded (no encrypted sections). | |
| formats::ValidationReport | validate () const |
| Result< void > | ensureValid () const |
| Validate and raise on the first error instead of returning a report — the assert-style face of validate(). | |
| const TableCore & | core () const |
| The erased engine (bindings and tests reach the shared machinery here). | |
Public Attributes | |
| std::vector< Record > | records |
| The decoded records, file order. | |
Static Public Attributes | |
| static constexpr ClientVersion | Version = Record::Version |
| The client version the record schema belongs to. | |
| static constexpr std::string_view | TableName = Record::TableName |
| The WoWDBDefs table name (e.g. | |
A client database table: the typed records of one DBFilesClient file.
A thin typed shell: the records vector and the identity are here, the engine is the shared TableCore. Copy/move re-_wire the core at the fresh records vector — the one obligation a core owner carries.
| Record | the record type (generated, or hand-written per schema.hpp's TableRecord contract). |
|
inline |
Definition at line 62 of file table.hpp.
Referenced by operator=(), operator=(), Table(), and Table().
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
The encrypted sections skipped on the last read (empty when the file was fully decodable or is not a WDC format).
|
inlinenodiscard |
Validate and raise on the first error instead of returning a report — the assert-style face of validate().
Definition at line 163 of file table.hpp.
References validate().
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inlinenodiscard |
Definition at line 156 of file table.hpp.
Referenced by ensureValid().
|
inline |
Serialize the table.
A loaded table re-emits the magic it was read from; a fresh table uses its client version's canonical .dbc/.db2 format (write(fs, key) can override by the target path's extension).
| policy | how keyless encrypted sections are handled (WDC only). |
| policy | keyless-section handling (WDC only) |
Definition at line 112 of file table.hpp.
References wowlib::db::Preserve.
|
inline |
Serialize the table into a client filesystem (project overlay).
| fs | the filesystem gateway. |
| key | the file to write; needs a resolvable path. |
| policy | how keyless encrypted sections are handled (see write()). |
| fs | the filesystem gateway |
| key | the file to write |
| policy | keyless-section handling (WDC only) |
Definition at line 123 of file table.hpp.
References wowlib::db::Preserve.
| std::vector<Record> wowlib::db::Table< Record >::records |
The decoded records, file order.
Mutate in place; write() serializes exactly this list.
Definition at line 60 of file table.hpp.
Referenced by operator=(), operator=(), Table(), and Table().
|
staticconstexpr |
|
staticconstexpr |