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
7
namespace
VoltMod::Schema
8
{
9
10
/** Where the generator found one field the accessors use. */
11
struct
FieldLayout
12
{
13
std::string_view
Class
;
14
std::string_view
Field
;
15
int32_t
Offset
= 0;
16
int32_t
Size
= 0;
17
};
18
19
/** Every field baked into the generated accessors, owner links included. */
20
std::span<const FieldLayout>
GeneratedLayout
();
21
22
/** The game build represented by @ref GeneratedLayout. */
23
std::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
*/
32
uint64_t
GeneratedLayoutStamp
();
33
34
}
// namespace VoltMod::Schema
VoltMod::Offset
Definition
BindingTypes.hpp:78
VoltMod::Schema
Definition
CBaseAnimGraph.hpp:10
VoltMod::Schema::GeneratedFromBuild
std::string_view GeneratedFromBuild()
Definition
Layout.cpp:117
VoltMod::Schema::GeneratedLayoutStamp
uint64_t GeneratedLayoutStamp()
A hash of everything GeneratedLayout holds.
Definition
Layout.cpp:122
VoltMod::Schema::GeneratedLayout
std::span< const FieldLayout > GeneratedLayout()
Definition
Layout.cpp:112
VoltMod::ReadFile
static std::string ReadFile(const std::filesystem::path &path)
Definition
Loader.cpp:56
VoltMod::Schema::FieldLayout
Definition
Layout.hpp:12
VoltMod::Schema::FieldLayout::Size
int32_t Size
Definition
Layout.hpp:16
VoltMod::Schema::FieldLayout::Field
std::string_view Field
Definition
Layout.hpp:14
VoltMod::Schema::FieldLayout::Class
std::string_view Class
Definition
Layout.hpp:13
src
Schema
Layout.hpp
Generated by
1.9.8