25 template <ClientVersion V>
29 const auto rootData =
fs.readFile(
FileKey{path});
36 const auto rewrittenRoot = root.
write();
47 if constexpr (
requires { root.groupFdids; }) byFdid = root.groupFdids.size() >= nGroups;
49 for (std::size_t i = 0; i < nGroups; ++i) {
51 if constexpr (
requires { root.groupFdids; })
53 return FileKey{std::format(
"{}_{:03}.wmo", path.substr(0, path.size() - 4), i)};
55 const auto groupData =
fs.readFile(groupKey);
60 if (
auto r = group.
read(*groupData); !r)
65 const auto rewritten = group.
write();
80 return roundtripWmo<V>(
fs, path);
Internals of the round-trip audit (namespace wowlib::audit::detail): the per-format driver class — on...
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 fail...
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 e...
bool withVersion(const ClientVersion v, F &&f)
Invoke f with the targeted release constant matching v as a compile-time template argument — the runt...
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 di...
RoundtripReport skipped(std::string_view reason)
A skipped outcome — ok, tagged with the reason.
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 enclos...
RoundtripReport guarded(F &&f)
Run one file's driver, converting any escaping exception into a failed outcome — one pathological fil...
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 occurr...
RoundtripReport unrecognizedVersion(const ClientVersion v)
The dispatch-failure outcome for a version outside the targeted releases.
The WMO entity (namespace wowlib::formats::wmo): a v17 world map object with its root file (wmo::root...