Quake-style console variable, defined in RoR.cfg or crated via Console UI and scripts.
More...
#include <CVar.h>
|
| CVar (std::string const &name, std::string const &long_name, int flags) |
|
template<typename T > |
void | setVal (T val) |
|
void | setStr (std::string const &str) |
|
std::string const & | getStr () const |
|
float | getFloat () const |
|
int | getInt () const |
|
bool | getBool () const |
|
template<typename T > |
T | getEnum () const |
|
std::string const & | getName () const |
|
std::string const & | getLongName () const |
|
bool | hasFlag (int f) const |
|
Quake-style console variable, defined in RoR.cfg or crated via Console UI and scripts.
Inspired by Quake II:
- Author
- Petr Ohlidal, 2020
Definition at line 52 of file CVar.h.
◆ CVar()
RoR::CVar::CVar |
( |
std::string const & |
name, |
|
|
std::string const & |
long_name, |
|
|
int |
flags |
|
) |
| |
|
inline |
◆ convertStr()
std::string CVar::convertStr |
( |
float |
val | ) |
|
|
private |
◆ getBool()
bool RoR::CVar::getBool |
( |
| ) |
const |
|
inline |
◆ getEnum()
template<typename T >
T RoR::CVar::getEnum |
( |
| ) |
const |
|
inline |
◆ getFloat()
float RoR::CVar::getFloat |
( |
| ) |
const |
|
inline |
◆ getInt()
int RoR::CVar::getInt |
( |
| ) |
const |
|
inline |
◆ getLongName()
std::string const& RoR::CVar::getLongName |
( |
| ) |
const |
|
inline |
◆ getName()
std::string const& RoR::CVar::getName |
( |
| ) |
const |
|
inline |
◆ getStr()
std::string const& RoR::CVar::getStr |
( |
| ) |
const |
|
inline |
◆ hasFlag()
bool RoR::CVar::hasFlag |
( |
int |
f | ) |
const |
|
inline |
◆ logUpdate()
void CVar::logUpdate |
( |
std::string const & |
new_val | ) |
|
|
private |
◆ setStr()
void RoR::CVar::setStr |
( |
std::string const & |
str | ) |
|
|
inline |
◆ setVal()
template<typename T >
void RoR::CVar::setVal |
( |
T |
val | ) |
|
|
inline |
◆ m_flags
◆ m_long_name
std::string RoR::CVar::m_long_name |
|
private |
◆ m_name
std::string RoR::CVar::m_name |
|
private |
◆ m_value_num
float RoR::CVar::m_value_num |
|
private |
◆ m_value_str
std::string RoR::CVar::m_value_str |
|
private |
The documentation for this class was generated from the following files: