wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
wowlib::db::TableCore Class Reference

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

Detailed Description

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.

Member Function Documentation

◆ encryptedSections()

const std::vector< EncryptedSection > & wowlib::db::TableCore::encryptedSections ( ) const
inline

Definition at line 95 of file table_core.hpp.

◆ ensureValid()

Result< void > wowlib::db::TableCore::ensureValid ( ) const
inline

Definition at line 101 of file table_core.hpp.

References validate().

◆ fullyDecoded()

bool wowlib::db::TableCore::fullyDecoded ( ) const
inline

Definition at line 99 of file table_core.hpp.

◆ info()

const TableInfo & wowlib::db::TableCore::info ( ) const
inline

The identity the codecs work from (empty-schema when unwired).

Definition at line 104 of file table_core.hpp.

Referenced by wire(), and wire().

◆ ops()

const detail::RecordOps * wowlib::db::TableCore::ops ( ) const
inline

Definition at line 109 of file table_core.hpp.

Referenced by wire().

◆ read() [1/2]

Result< void > wowlib::db::TableCore::read ( fs::FileSystem & fs,
const FileKey & key )

Definition at line 48 of file table_core.cpp.

References read().

◆ read() [2/2]

◆ recordsVec()

void * wowlib::db::TableCore::recordsVec ( ) const
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.

Referenced by rewire(), and wire().

◆ rewire() [1/2]

void wowlib::db::TableCore::rewire ( RecordSink * sink,
const RecordSource * source )
inline

The external-wiring twin of rewire.

Parameters
sinkthe copied owner's sink.
sourcethe copied owner's source.

Definition at line 83 of file table_core.hpp.

◆ rewire() [2/2]

void wowlib::db::TableCore::rewire ( void * recordsVec)
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().

◆ strings()

const formats::StringBlock & wowlib::db::TableCore::strings ( ) const
inline

Definition at line 93 of file table_core.hpp.

◆ validate()

◆ wire() [1/2]

void wowlib::db::TableCore::wire ( RecordSink * sink,
const RecordSource * source,
TableInfo info )
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.

Parameters
sinkthe decode target (kept alive by the owner).
sourcethe encode source (kept alive by the owner).
infothe runtime identity + schema.

Definition at line 70 of file table_core.hpp.

References info().

◆ wire() [2/2]

void wowlib::db::TableCore::wire ( void * recordsVec,
const detail::RecordOps * ops,
TableInfo 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().

◆ write() [1/2]

Result< FileBuffer > wowlib::db::TableCore::write ( EncryptedPolicy policy) const

Definition at line 55 of file table_core.cpp.

◆ write() [2/2]

Result< void > wowlib::db::TableCore::write ( fs::FileSystem & fs,
const FileKey & key,
EncryptedPolicy policy ) const

The documentation for this class was generated from the following files: