VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
PluginDependencies.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Host/Plugins/InstalledPlugins.hpp
"
4
5
#include <
VoltMod/Core/Result.hpp
>
6
#include <span>
7
#include <string>
8
#include <string_view>
9
#include <vector>
10
11
namespace
VoltMod
12
{
13
14
/** Which plugins the host loads and which it turns away, with the reason. Both alphabetical. */
15
struct
LoadList
16
{
17
std::vector<std::string>
ToLoad
;
18
std::vector<RefusedPlugin>
Refused
;
19
};
20
21
/** Pure: no files, logs or SDK. */
22
namespace
PluginDependencies
23
{
24
25
/**
26
* @brief Decide which of @p installed the host loads.
27
*
28
* A missing or refused required dependency refuses its dependents transitively; optional ones never
29
* refuse. Load order is alphabetical and carries no meaning: plugins reach each other through
30
* @ref VoltMod::ServiceExchange at call time.
31
*/
32
LoadList
Resolve
(std::span<const PluginManifest> installed);
33
34
/** The plugins in @p loaded that require @p plugin, directly or transitively; what `volt unload`
35
* refuses for and `volt reload` takes down with it. Alphabetical. */
36
std::vector<std::string>
RequiredDependents
(std::string_view plugin, std::span<const PluginManifest> loaded);
37
38
}
// namespace PluginDependencies
39
}
// namespace VoltMod
InstalledPlugins.hpp
Result.hpp
VoltMod::PluginDependencies
Definition
PluginDependencies.hpp:23
VoltMod::PluginDependencies::Resolve
LoadList Resolve(std::span< const PluginManifest > installed)
Decide which of installed the host loads.
Definition
PluginDependencies.cpp:61
VoltMod::PluginDependencies::RequiredDependents
std::vector< std::string > RequiredDependents(std::string_view plugin, std::span< const PluginManifest > loaded)
Definition
PluginDependencies.cpp:93
VoltMod
Definition
Options.hpp:13
VoltMod::LoadList
Definition
PluginDependencies.hpp:16
VoltMod::LoadList::ToLoad
std::vector< std::string > ToLoad
Definition
PluginDependencies.hpp:17
VoltMod::LoadList::Refused
std::vector< RefusedPlugin > Refused
Definition
PluginDependencies.hpp:18
src
Host
Plugins
PluginDependencies.hpp
Generated by
1.15.0