VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
ConVarTypes.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
#include <string>
5
6
namespace
VoltMod
7
{
8
9
/**
10
* SDK-free mirror of `EConVarType` used by handle validation and console parsing.
11
* ConVar.cpp verifies every value against the SDK with static_asserts.
12
*/
13
enum class
ConVarType
:
int16_t
14
{
15
Invalid
= -1,
16
Bool
,
17
Int16
,
18
UInt16
,
19
Int32
,
20
UInt32
,
21
Int64
,
22
UInt64
,
23
Float32
,
24
Float64
,
25
String
,
26
Color
,
27
Vector2
,
28
Vector3
,
29
Vector4
,
30
QAngle
,
31
VectorWS
32
};
33
34
/**
35
* Whether a handle for @p T can access engine kind @p type.
36
*
37
* All integer kinds use `int`; the engine accessor preserves their storage width. Bool remains a
38
* separate kind because accepting an `int` handle for it silently drops writes.
39
*/
40
template
<
class
T>
41
bool
ConVarTypeMatches
(
ConVarType
type);
42
43
}
// namespace VoltMod
VoltMod
Definition
Options.hpp:13
VoltMod::ErrorCode::Invalid
@ Invalid
The caller's input does not parse or does not satisfy a precondition.
VoltMod::ReadFile
static std::string ReadFile(const std::filesystem::path &path)
Definition
Loader.cpp:56
VoltMod::QAngle
::QAngle QAngle
Definition
Math.hpp:14
VoltMod::ConVarType
ConVarType
Definition
ConVarTypes.hpp:14
VoltMod::ConVarType::VectorWS
@ VectorWS
VoltMod::ConVarType::Vector3
@ Vector3
VoltMod::ConVarType::Float32
@ Float32
VoltMod::ConVarType::Vector2
@ Vector2
VoltMod::ConVarType::String
@ String
VoltMod::ConVarType::Int16
@ Int16
VoltMod::ConVarType::UInt16
@ UInt16
VoltMod::ConVarType::UInt64
@ UInt64
VoltMod::ConVarType::Int32
@ Int32
VoltMod::ConVarType::Bool
@ Bool
VoltMod::ConVarType::Vector4
@ Vector4
VoltMod::ConVarType::Float64
@ Float64
VoltMod::ConVarType::UInt32
@ UInt32
VoltMod::ConVarType::Int64
@ Int64
VoltMod::ConVarTypeMatches
bool ConVarTypeMatches(ConVarType type)
Definition
ConVarTypes.cpp:12
VoltMod::Color
An RGBA color in the engine's byte order, as m_clrRender and glow colors hold it.
Definition
Color.hpp:15
src
Engine
ConVars
ConVarTypes.hpp
Generated by
1.9.8