VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
Layout.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <span>
5#include <string_view>
6
7namespace VoltMod::Schema
8{
9
10/** Where the generator found one field the accessors use. */
12{
13 std::string_view Class;
14 std::string_view Field;
17};
18
19/** Every field baked into the generated accessors, owner links included. */
20std::span<const FieldLayout> GeneratedLayout();
21
22/** The game build represented by @ref GeneratedLayout. */
23std::string_view GeneratedFromBuild();
24
25/**
26 * @brief A hash of everything @ref GeneratedLayout holds.
27 *
28 * The host verifies its own copy of the layout, and a plugin may only take that answer when it
29 * was built from the same one. Both sides compare this; different values mean the plugin is
30 * built against other offsets and must be rebuilt.
31 */
33
34} // namespace VoltMod::Schema
std::string_view GeneratedFromBuild()
Definition Layout.cpp:117
uint64_t GeneratedLayoutStamp()
A hash of everything GeneratedLayout holds.
Definition Layout.cpp:122
std::span< const FieldLayout > GeneratedLayout()
Definition Layout.cpp:112
static std::string ReadFile(const std::filesystem::path &path)
Definition Loader.cpp:56
std::string_view Field
Definition Layout.hpp:14
std::string_view Class
Definition Layout.hpp:13