2#include "../Utils/Memory.h"
6 optional <string>
name()
const {
17 void set(
const T value) {
35 optional<CCvarNode*>
find_by_name(
const string& name_to_find)
const {
36 for (
size_t index = 0;
auto current_node = this->
node()->
node_by_index(index); ++index) {
37 if (
const auto current_name = current_node->name(); current_name && current_name.value() == name_to_find)
46 for (
size_t index = 0;
auto current_node = this->
node()->
node_by_index(index); ++index) {
47 if (
const auto current_name = current_node->name(); current_name) {
48 g_convars[current_name.value()] = current_node;
57 static inline std::unordered_map<string, CCvarNode*>
g_convars;
optional< string > name() const
Definition CCvar.h:6
void set(const T value)
Definition CCvar.h:17
T get() const
Definition CCvar.h:12
CCvarNode * node_by_index(const size_t index) const
Definition CCvar.h:24
static std::unordered_map< string, CCvarNode * > g_convars
Global variable to store dumped ConVars.
Definition CCvar.h:57
optional< CCvarNode * > find_by_name(const string &name_to_find) const
Definition CCvar.h:35
size_t load_convars() const
Definition CCvar.h:44
CCvarNodes * node() const
Definition CCvar.h:31
static optional< T > read_memory(const N &address)
Definition Memory.h:78
static optional< string > read_string(const T &address, const size_t max_length=64)
Definition Memory.h:125