wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
mpq_chain.hpp
Go to the documentation of this file.
1#pragma once
2
7
8#include <filesystem>
9#include <span>
10#include <string_view>
11#include <vector>
12
14#include <wowlib/core/error.hpp>
15
16namespace wowlib::fs::detail {
24
26 struct ChainEntry {
28 std::string_view pattern;
29 };
30
47
55
61 struct ChainMember {
62 std::filesystem::path path;
63 bool isDirectory = false;
64 bool incremental = false;
65 std::string prefix;
70 };
71
76 const MpqChainSpec* findChainSpec(const ClientVersion& version);
77
100 expandChain(const MpqChainSpec& spec, const std::filesystem::path& dataDir, Locale locale);
101}
Client version identity, the flavor axis that separates a client's CONTENT version from the engine ge...
The error-handling vocabulary: ErrorCode, Error and the Result<T> alias every fallible wowlib operati...
ChainEntryKind
How one base-tier row produces its archive path.
Definition mpq_chain.hpp:20
@ Fixed
One archive in Data/, e.g.
Definition mpq_chain.hpp:21
@ LocaleFixed
One archive in Data/{locale}/, "{locale}" expanded.
Definition mpq_chain.hpp:22
const MpqChainSpec * findChainSpec(const ClientVersion &version)
The chain spec for version: exact build match first, then major.minor.patch.
PatchScheme
How a version's patch tier is discovered on disk.
Definition mpq_chain.hpp:32
@ UpdateChain
cata/MoP incremental updates: wow-update-{build}.MPQ / wow-update-base-{build}.MPQ in Data/ and wow-u...
Definition mpq_chain.hpp:38
@ ClassicWildcard
Pre-Cata wildcard patch tier.
Definition mpq_chain.hpp:34
Result< std::vector< ChainMember > > expandChain(const MpqChainSpec &spec, const std::filesystem::path &dataDir, Locale locale)
Expand a chain spec against a Data directory into concrete members in load order (lowest -> highest p...
std::expected< T, Error > Result
Every fallible wowlib operation returns Result<T>; bindings translate the error branch into a target-...
Definition error.hpp:100
One resolved member of a chain, in load order.
Definition mpq_chain.hpp:61
std::string prefix
Incremental only: which update group the member came from ("base" or the locale code).
Definition mpq_chain.hpp:65
bool incremental
true => a wow-update patch to attach, not open.
Definition mpq_chain.hpp:64
std::filesystem::path path
The archive file or loose-dir root on disk.
Definition mpq_chain.hpp:62
bool isDirectory
true => loose files, not a StormLib archive.
Definition mpq_chain.hpp:63
A client version's archive chain: the fixed base tier plus how its patch tier is found.
Definition mpq_chain.hpp:50
std::span< const ChainEntry > baseEntries
Definition mpq_chain.hpp:52