wowlib
0.0.0
Read & write World of Warcraft client files — a C++26 core
Toggle main menu visibility
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
13
#include <
wowlib/core/client_version.hpp
>
14
#include <
wowlib/core/error.hpp
>
15
16
namespace
wowlib::fs::detail
{
20
enum class
ChainEntryKind
{
21
Fixed
,
22
LocaleFixed
,
23
};
24
26
struct
ChainEntry
{
27
ChainEntryKind
kind
;
28
std::string_view
pattern
;
29
};
30
32
enum class
PatchScheme
{
33
None
,
34
ClassicWildcard
,
38
UpdateChain
,
46
};
47
50
struct
MpqChainSpec
{
51
ClientVersion
version
;
52
std::span<const ChainEntry>
baseEntries
;
53
PatchScheme
patchScheme
=
PatchScheme::None
;
54
};
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
99
Result<std::vector<ChainMember>
>
100
expandChain
(
const
MpqChainSpec
& spec,
const
std::filesystem::path& dataDir,
Locale
locale);
101
}
client_version.hpp
Client version identity, the flavor axis that separates a client's CONTENT version from the engine ge...
error.hpp
The error-handling vocabulary: ErrorCode, Error and the Result<T> alias every fallible wowlib operati...
wowlib::fs::detail
Definition
fdid_allocator.hpp:13
wowlib::fs::detail::ChainEntryKind
ChainEntryKind
How one base-tier row produces its archive path.
Definition
mpq_chain.hpp:20
wowlib::fs::detail::ChainEntryKind::Fixed
@ Fixed
One archive in Data/, e.g.
Definition
mpq_chain.hpp:21
wowlib::fs::detail::ChainEntryKind::LocaleFixed
@ LocaleFixed
One archive in Data/{locale}/, "{locale}" expanded.
Definition
mpq_chain.hpp:22
wowlib::fs::detail::findChainSpec
const MpqChainSpec * findChainSpec(const ClientVersion &version)
The chain spec for version: exact build match first, then major.minor.patch.
Definition
mpq_chain.cpp:282
wowlib::fs::detail::PatchScheme
PatchScheme
How a version's patch tier is discovered on disk.
Definition
mpq_chain.hpp:32
wowlib::fs::detail::PatchScheme::UpdateChain
@ UpdateChain
cata/MoP incremental updates: wow-update-{build}.MPQ / wow-update-base-{build}.MPQ in Data/ and wow-u...
Definition
mpq_chain.hpp:38
wowlib::fs::detail::PatchScheme::None
@ None
No patch tier.
Definition
mpq_chain.hpp:33
wowlib::fs::detail::PatchScheme::ClassicWildcard
@ ClassicWildcard
Pre-Cata wildcard patch tier.
Definition
mpq_chain.hpp:34
wowlib::fs::detail::expandChain
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...
Definition
mpq_chain.cpp:292
wowlib::Result
std::expected< T, Error > Result
Every fallible wowlib operation returns Result<T>; bindings translate the error branch into a target-...
Definition
error.hpp:100
wowlib::Locale
Locale
Definition
client_version.hpp:285
wowlib::ClientVersion
Definition
client_version.hpp:33
wowlib::fs::detail::ChainEntry
One base-tier row.
Definition
mpq_chain.hpp:26
wowlib::fs::detail::ChainEntry::pattern
std::string_view pattern
Definition
mpq_chain.hpp:28
wowlib::fs::detail::ChainEntry::kind
ChainEntryKind kind
Definition
mpq_chain.hpp:27
wowlib::fs::detail::ChainMember
One resolved member of a chain, in load order.
Definition
mpq_chain.hpp:61
wowlib::fs::detail::ChainMember::prefix
std::string prefix
Incremental only: which update group the member came from ("base" or the locale code).
Definition
mpq_chain.hpp:65
wowlib::fs::detail::ChainMember::incremental
bool incremental
true => a wow-update patch to attach, not open.
Definition
mpq_chain.hpp:64
wowlib::fs::detail::ChainMember::path
std::filesystem::path path
The archive file or loose-dir root on disk.
Definition
mpq_chain.hpp:62
wowlib::fs::detail::ChainMember::isDirectory
bool isDirectory
true => loose files, not a StormLib archive.
Definition
mpq_chain.hpp:63
wowlib::fs::detail::MpqChainSpec
A client version's archive chain: the fixed base tier plus how its patch tier is found.
Definition
mpq_chain.hpp:50
wowlib::fs::detail::MpqChainSpec::baseEntries
std::span< const ChainEntry > baseEntries
Definition
mpq_chain.hpp:52
wowlib::fs::detail::MpqChainSpec::version
ClientVersion version
Definition
mpq_chain.hpp:51
wowlib::fs::detail::MpqChainSpec::patchScheme
PatchScheme patchScheme
Definition
mpq_chain.hpp:53
src
wowlib
fs
mpq
mpq_chain.hpp
Generated by
1.17.0