|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
Classes | |
| class | FormatDrivers |
| The per-format round-trip drivers behind Auditor::roundtrip. More... | |
Functions | |
| RoundtripReport | failed (std::string stage, std::string error) |
| A failed outcome. | |
| RoundtripReport | skipped (std::string_view reason) |
| A skipped outcome — ok, tagged with the reason. | |
| RoundtripReport | failWith (RoundtripReport &report, std::string stage, std::string error) |
| Mark report failed in place and hand it back — keeps the unknown-chunk tally gathered before the failure. | |
| std::optional< RoundtripReport > | classifyRead (RoundtripReport &report, std::string stage, const Result< FileBuffer > &result) |
| Classify a client-file read for the audit: content behind an unknown TACT key and zero-byte archive entries (classic-era clients ship thousands of empty placeholder files) cannot be round-tripped and are skips, not failures; other errors fail at stage. | |
| void | tallyUnknown (RoundtripReport &report, const formats::ChunkExtras &extras, formats::FourCCEndian endian=formats::FourCCEndian::Reversed) |
| Append every unmodeled chunk of a parsed entity to the report's tally, one fourcc spelling per occurrence. | |
| template<typename F> | |
| RoundtripReport | guarded (F &&f) |
| Run one file's driver, converting any escaping exception into a failed outcome — one pathological file must not kill an hours-long sweep. | |
| std::optional< std::string > | firstDivergence (const FileBuffer &original, const FileBuffer &rewritten) |
| The first byte divergence between an original and a rewrite, described by offset and sizes — the stability compare's diagnostic for offset formats (no chunk framing to locate the divergence in). | |
| std::optional< std::string > | firstDivergenceChunked (const FileBuffer &original, const FileBuffer &rewritten) |
| The first byte divergence between an original chunk stream and its rewrite, located within the enclosing chunk — the byte-perfect guarantee's debugging lens (ported from the round-trip tests' requireIdentical). | |
| template<typename F> | |
| bool | withVersion (const ClientVersion v, F &&f) |
| Invoke f with the targeted release constant matching v as a compile-time template argument — the runtime-to-compile-time bridge of the version dispatch. | |
| constexpr bool | versionSupported (std::span< const ClientVersion > grid, const ClientVersion v) |
| Whether a format's instantiation grid carries v — the per-format if constexpr guard of the version dispatch. | |
| RoundtripReport | unrecognizedVersion (const ClientVersion v) |
| The dispatch-failure outcome for a version outside the targeted releases. | |
|
inline |
Classify a client-file read for the audit: content behind an unknown TACT key and zero-byte archive entries (classic-era clients ship thousands of empty placeholder files) cannot be round-tripped and are skips, not failures; other errors fail at stage.
| report | the report under construction. |
| stage | the stage label for a genuine read failure. |
| result | the filesystem read result. |
Definition at line 72 of file detail.hpp.
References wowlib::EncryptedContent, wowlib::audit::RoundtripReport::error, failWith(), and skipped().
|
inline |
A failed outcome.
| stage | which stage failed. |
| error | the failure diagnostic. |
Definition at line 34 of file detail.hpp.
References wowlib::audit::RoundtripReport::error, wowlib::audit::RoundtripReport::ok, and wowlib::audit::RoundtripReport::stage.
Referenced by guarded(), and unrecognizedVersion().
|
inline |
Mark report failed in place and hand it back — keeps the unknown-chunk tally gathered before the failure.
| report | the report to mark. |
| stage | which stage failed. |
| error | the failure diagnostic. |
Definition at line 57 of file detail.hpp.
References wowlib::audit::RoundtripReport::error, wowlib::audit::RoundtripReport::ok, and wowlib::audit::RoundtripReport::stage.
Referenced by classifyRead().
|
inline |
The first byte divergence between an original and a rewrite, described by offset and sizes — the stability compare's diagnostic for offset formats (no chunk framing to locate the divergence in).
| original | the reference bytes. |
| rewritten | the bytes to compare. |
Definition at line 118 of file detail.hpp.
|
inline |
The first byte divergence between an original chunk stream and its rewrite, located within the enclosing chunk — the byte-perfect guarantee's debugging lens (ported from the round-trip tests' requireIdentical).
| original | the reference bytes. |
| rewritten | the bytes to compare. |
Definition at line 134 of file detail.hpp.
References wowlib::formats::fourccToString().
| RoundtripReport wowlib::audit::detail::guarded | ( | F && | f | ) |
Run one file's driver, converting any escaping exception into a failed outcome — one pathological file must not kill an hours-long sweep.
| F | the driver callable type (returns RoundtripReport). |
| f | the driver call. |
Definition at line 100 of file detail.hpp.
References failed().
Referenced by wowlib::audit::detail::FormatDrivers::adt(), wowlib::audit::detail::FormatDrivers::blp(), wowlib::audit::detail::FormatDrivers::m2(), wowlib::audit::detail::FormatDrivers::wdl(), wowlib::audit::detail::FormatDrivers::wdt(), and wowlib::audit::detail::FormatDrivers::wmo().
|
inline |
A skipped outcome — ok, tagged with the reason.
| reason | the skip reason ("wmo-group", "unsupported-version", ...). |
Definition at line 45 of file detail.hpp.
References wowlib::audit::RoundtripReport::stage.
Referenced by wowlib::audit::detail::FormatDrivers::adt(), classifyRead(), wowlib::audit::detail::FormatDrivers::m2(), wowlib::audit::Auditor::roundtrip(), wowlib::audit::detail::FormatDrivers::wdl(), wowlib::audit::detail::FormatDrivers::wdt(), and wowlib::audit::detail::FormatDrivers::wmo().
|
inline |
Append every unmodeled chunk of a parsed entity to the report's tally, one fourcc spelling per occurrence.
| report | the report accumulating the sweep. |
| extras | the entity's chunk bookkeeping. |
Definition at line 87 of file detail.hpp.
References wowlib::formats::UnknownChunk::fourcc, wowlib::formats::fourccToString(), wowlib::formats::Reversed, wowlib::formats::ChunkExtras::unknown, and wowlib::audit::RoundtripReport::unknownChunks.
|
inline |
The dispatch-failure outcome for a version outside the targeted releases.
| v | the unrecognized version. |
Definition at line 202 of file detail.hpp.
References wowlib::ClientVersion::build, failed(), wowlib::ClientVersion::major, wowlib::ClientVersion::minor, and wowlib::ClientVersion::patch.
Referenced by wowlib::audit::detail::FormatDrivers::adt(), wowlib::audit::detail::FormatDrivers::m2(), wowlib::audit::detail::FormatDrivers::wdl(), wowlib::audit::detail::FormatDrivers::wdt(), and wowlib::audit::detail::FormatDrivers::wmo().
|
constexpr |
Whether a format's instantiation grid carries v — the per-format if constexpr guard of the version dispatch.
| grid | the format's *_versions array. |
| v | the version to look for. |
Definition at line 193 of file detail.hpp.
Referenced by wowlib::audit::detail::FormatDrivers::adt(), wowlib::audit::detail::FormatDrivers::m2(), wowlib::audit::detail::FormatDrivers::wdl(), wowlib::audit::detail::FormatDrivers::wdt(), and wowlib::audit::detail::FormatDrivers::wmo().
| bool wowlib::audit::detail::withVersion | ( | const ClientVersion | v, |
| F && | f ) |
Invoke f with the targeted release constant matching v as a compile-time template argument — the runtime-to-compile-time bridge of the version dispatch.
| F | a functor with a template <ClientVersion V> void operator()(). |
| v | the runtime client version. |
| f | the functor to invoke. |
Definition at line 166 of file detail.hpp.
References wowlib::versions::Bfa, wowlib::versions::Cata, wowlib::versions::Dragonflight, wowlib::versions::Legion, wowlib::versions::Mop, wowlib::versions::Shadowlands, wowlib::versions::Tbc, wowlib::versions::Tww, wowlib::versions::Vanilla, wowlib::versions::Wod, and wowlib::versions::Wotlk.
Referenced by wowlib::audit::detail::FormatDrivers::adt(), wowlib::audit::detail::FormatDrivers::m2(), wowlib::audit::detail::FormatDrivers::wdl(), wowlib::audit::detail::FormatDrivers::wdt(), and wowlib::audit::detail::FormatDrivers::wmo().