class
TConsoleVariable
T is int / float / bool / std::string.
- Module
- Core
- Header
#include "Core/IConsoleManager.h"- Namespace
Mowo- Template
template<typename T>
Constructors
| Signature | Name | Description |
|---|---|---|
TConsoleVariable(std::string name, T defaultValue, std::string helpText, EConsol… | TConsoleVariable | Flags before Register: registration replays the command line, which must already see a Cheat or ReadOnly cvar as one. |
~TConsoleVariable() override | ~TConsoleVariable |
Public functions
| Returns | Name | Description |
|---|---|---|
T | Get | Atomic load — call from any thread. |
T | GetDefault | |
void | Set | The raw write: code that mirrors live state into its own cvar (the upscaler that fell back, a toggle a panel owns). |
bool | Set | |
const std::string& | GetName | |
const std::string& | GetHelpText | |
std::string | GetValueAsString | |
bool | SetFromString | |
void | ResetToDefault |
Function details
TConsoleVariable
C++
TConsoleVariable(std::string name, T defaultValue, std::string helpText, EConsoleVariableFlags flags = EConsoleVariableFlags::None) : m_name(std::move(name)), m_help(std::move(helpText)), m_default(defaultValue), m_value(defaultValue)Flags before Register: registration replays the command line, which must already see a Cheat or ReadOnly cvar as one.
~TConsoleVariable
C++
~TConsoleVariable() overrideGet
C++
T Get() const noexceptAtomic load — call from any thread. Writers serialise through SetByName.
GetDefault
C++
T GetDefault() const noexceptSet
C++
void Set(T value) noexceptThe raw write: code that mirrors live state into its own cvar (the upscaler that fell back, a toggle a panel owns). No priority check, and the recorded source stays.
Set
C++
bool Set(T value, ECVarSetBy setBy) noexceptGetName
C++
const std::string& GetName() const noexcept overrideGetHelpText
C++
const std::string& GetHelpText() const noexcept overrideGetValueAsString
C++
std::string GetValueAsString() const overrideSetFromString
C++
bool SetFromString(std::string_view str) overrideResetToDefault
C++
void ResetToDefault() overrideGenerated from Core/IConsoleManager.h via core.json · Nov 5, 2026Version 1.0.0