CS2-Kit
C++23 library for CS2 Metamod:Source plugin development
Loading...
Searching...
No Matches
Schema.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <CS2Kit/Core/Singleton.hpp>
4
#include <cstdint>
5
#include <map>
6
#include <string>
7
8
namespace
CS2Kit::Sdk
9
{
10
11
/**
12
* Runtime schema field offset resolution via ISchemaSystem.
13
* Provides access to entity field offsets at runtime by querying the
14
* engine's schema system. Results are cached for O(1) repeated access.
15
*/
16
class
SchemaService
:
public
Core::Singleton<SchemaService>
17
{
18
public
:
19
explicit
SchemaService
(Token) {}
20
21
bool
Initialize
();
22
int
GetOffset
(
const
char
* className,
const
char
* fieldName);
23
24
private
:
25
std::map<std::string, std::map<std::string, int>> _offsetCache;
26
};
27
28
}
// namespace CS2Kit::Sdk
CS2Kit::Sdk::SchemaService
Definition
Schema.hpp:17
CS2Kit::Sdk::SchemaService::SchemaService
SchemaService(Token)
Definition
Schema.hpp:19
CS2Kit::Sdk::SchemaService::Initialize
bool Initialize()
Definition
Schema.cpp:12
CS2Kit::Sdk::SchemaService::GetOffset
int GetOffset(const char *className, const char *fieldName)
Definition
Schema.cpp:24
CS2Kit::Sdk
Definition
ChatInputCapture.cpp:7
src
Sdk
Schema.hpp
Generated by
1.9.8