RigsofRods
Soft-body Physics Simulation
doc
angelscript
Script2Game
CVarClass.h
Go to the documentation of this file.
1
2
namespace
Script2Game
{
3
16
enum
CVarFlags
17
{
18
CVAR_TYPE_BOOL
=
BITMASK
(1),
19
CVAR_TYPE_INT
=
BITMASK
(2),
20
CVAR_TYPE_FLOAT
=
BITMASK
(3),
21
CVAR_ARCHIVE
=
BITMASK
(4),
22
CVAR_NO_LOG
=
BITMASK
(5)
23
};
24
28
class
CVarClass
29
{
30
public
:
31
35
std::string
const
&
getStr
()
const
{
return
m_value_str; }
36
37
float
getFloat
()
const
{
return
m_value_num; }
38
39
int
getInt
()
const
{
return
(
int
)m_value_num; }
40
41
bool
getBool
()
const
{
return
(
bool
)m_value_num; }
42
43
std::string
const
&
getName
()
const
{
return
m_name; }
44
};
45
48
49
}
//namespace Script2Game
Script2Game::CVAR_TYPE_FLOAT
@ CVAR_TYPE_FLOAT
Definition:
CVarClass.h:20
Script2Game::CVarClass
Binding of RoR::CVar; A console variable, usually defined in RoR.cfg but also created by users or scr...
Definition:
CVarClass.h:28
Script2Game::CVAR_TYPE_BOOL
@ CVAR_TYPE_BOOL
Definition:
CVarClass.h:18
Script2Game
Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation.
Definition:
BeamClass.h:2
BITMASK
#define BITMASK(OFFSET)
Definition:
BitFlags.h:10
Script2Game::CVarClass::getBool
bool getBool() const
Definition:
CVarClass.h:41
Script2Game::CVarClass::getName
std::string const & getName() const
Definition:
CVarClass.h:43
Script2Game::CVarClass::getStr
std::string const & getStr() const
Get the value converted to string, works with any CVAR_TYPE.
Definition:
CVarClass.h:35
Script2Game::CVarClass::getFloat
float getFloat() const
Definition:
CVarClass.h:37
Script2Game::CVarFlags
CVarFlags
Types and special attributes of cvars.
Definition:
CVarClass.h:16
Script2Game::CVAR_NO_LOG
@ CVAR_NO_LOG
Will not be written to RoR.log.
Definition:
CVarClass.h:22
Script2Game::CVAR_TYPE_INT
@ CVAR_TYPE_INT
Definition:
CVarClass.h:19
Script2Game::CVarClass::getInt
int getInt() const
Definition:
CVarClass.h:39
Script2Game::CVAR_ARCHIVE
@ CVAR_ARCHIVE
Will be written to RoR.cfg.
Definition:
CVarClass.h:21
Generated by
1.8.17