|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
The erased engine of one table: identity + records access + preserved decode state, with every operation's body compiled once. More...
#include <wowlib/db/table_core.hpp>
Public Member Functions | |
| void | wire (void *recordsVec, const detail::RecordOps *ops, TableInfo info) |
| Point the core at its owner's records vector and identity. | |
| void | wire (RecordSink *sink, const RecordSource *source, TableInfo info) |
| Point the core at an EXTERNAL sink/source pair instead of a typed records vector — the generic column-store table's wiring (dyn_table). | |
| void | rewire (void *recordsVec) |
| Re-point at the owner's vector after the owner was copied/moved (state and identity travel with the core; only the pointer goes stale). | |
| void | rewire (RecordSink *sink, const RecordSource *source) |
| The external-wiring twin of rewire. | |
| Result< void > | read (std::span< const std::byte > data) |
| Result< void > | read (fs::FileSystem &fs, const FileKey &key) |
| Result< FileBuffer > | write (EncryptedPolicy policy) const |
| Result< void > | write (fs::FileSystem &fs, const FileKey &key, EncryptedPolicy policy) const |
| const formats::StringBlock & | strings () const |
| const std::vector< EncryptedSection > & | encryptedSections () const |
| bool | fullyDecoded () const |
| formats::ValidationReport | validate () const |
| Result< void > | ensureValid () const |
| const TableInfo & | info () const |
| The identity the codecs work from (empty-schema when unwired). | |
| void * | recordsVec () const |
| The owner's records vector + access facts (bindings use these to build live record views without re-templating on the record type). | |
| const detail::RecordOps * | ops () const |
The erased engine of one table: identity + records access + preserved decode state, with every operation's body compiled once.
Not welded — TableBase below is the bound face.
Definition at line 54 of file table_core.hpp.
|
inline |
Definition at line 95 of file table_core.hpp.
|
inline |
Definition at line 101 of file table_core.hpp.
References validate().
|
inline |
Definition at line 99 of file table_core.hpp.
|
inline |
The identity the codecs work from (empty-schema when unwired).
Definition at line 104 of file table_core.hpp.
|
inline |
Definition at line 109 of file table_core.hpp.
Referenced by wire().
| Result< void > wowlib::db::TableCore::read | ( | fs::FileSystem & | fs, |
| const FileKey & | key ) |
Definition at line 48 of file table_core.cpp.
References read().
| Result< void > wowlib::db::TableCore::read | ( | std::span< const std::byte > | data | ) |
Definition at line 29 of file table_core.cpp.
References wowlib::formats::Forward, wowlib::formats::fourccToString(), wowlib::db::wdc::isWdcMagic(), wowlib::makeError(), wowlib::db::readWdb2(), wowlib::db::readWdbc(), wowlib::db::wdc::readWdc(), wowlib::TableMagicUnknown, wowlib::TableTruncated, wowlib::db::Wdb2Magic, and wowlib::db::WdbcMagic.
Referenced by read().
|
inline |
The owner's records vector + access facts (bindings use these to build live record views without re-templating on the record type).
Definition at line 108 of file table_core.hpp.
|
inline |
The external-wiring twin of rewire.
| sink | the copied owner's sink. |
| source | the copied owner's source. |
Definition at line 83 of file table_core.hpp.
|
inline |
Re-point at the owner's vector after the owner was copied/moved (state and identity travel with the core; only the pointer goes stale).
Definition at line 78 of file table_core.hpp.
References recordsVec().
|
inline |
Definition at line 93 of file table_core.hpp.
| formats::ValidationReport wowlib::db::TableCore::validate | ( | ) | const |
Definition at line 80 of file table_core.cpp.
References wowlib::formats::ValidationReport::addError(), wowlib::formats::ValidationReport::full(), wowlib::db::RecordSource::getString(), wowlib::db::RecordSource::idOf(), wowlib::db::Column::isId, wowlib::db::Column::nameView(), wowlib::db::RecordSource::size(), and wowlib::db::Column::stringSlots().
Referenced by ensureValid().
|
inline |
Point the core at an EXTERNAL sink/source pair instead of a typed records vector — the generic column-store table's wiring (dyn_table).
One object usually implements both interfaces; the codecs and every method body here are indifferent to which wiring is live.
| sink | the decode target (kept alive by the owner). |
| source | the encode source (kept alive by the owner). |
| info | the runtime identity + schema. |
Definition at line 70 of file table_core.hpp.
References info().
|
inline |
Point the core at its owner's records vector and identity.
Definition at line 57 of file table_core.hpp.
References info(), ops(), and recordsVec().
| Result< FileBuffer > wowlib::db::TableCore::write | ( | EncryptedPolicy | policy | ) | const |
Definition at line 55 of file table_core.cpp.
| Result< void > wowlib::db::TableCore::write | ( | fs::FileSystem & | fs, |
| const FileKey & | key, | ||
| EncryptedPolicy | policy ) const |
Definition at line 63 of file table_core.cpp.
References wowlib::makeError(), wowlib::FileKey::path, and wowlib::PathNotResolvable.