|
stmm-games-doc
0.32.0
|
Classes | |
| class | Value |
| The formatted representation of a variable's value. More... | |
| struct | VariableType |
| The variable type. More... | |
Public Types | |
| enum | VARIABLE_TIME_BASE { VARIABLE_TIME_BASE_MILLISEC = 1, VARIABLE_TIME_BASE_SEC = 2, VARIABLE_TIME_BASE_MIN = 3 } |
| enum | VARIABLE_FORMAT { VARIABLE_FORMAT_NUMBER = 1, VARIABLE_FORMAT_MILL = 2, VARIABLE_FORMAT_MIN_SEC = 5, VARIABLE_FORMAT_MIN_SEC_MILLISEC = 6 } |
Public Member Functions | |
| Variable (const VariableType *p0VarType, Game *p0Game) noexcept | |
| Constructor. More... | |
| Value | getValue () const noexcept |
| Get the value. More... | |
| int32_t | get () const noexcept |
| Get the value as a number. More... | |
| void | set (int32_t nValue) noexcept |
| Set the value. More... | |
| void | inc (int32_t nInc) noexcept |
| Add a value to the current value. More... | |
| bool | isChanged () const noexcept |
| Tells whether the variable changed in the current game tick. More... | |
| const VariableType & | getType () const noexcept |
| Returns the type of the variable. More... | |
| std::string | toFormattedString () const noexcept |
| The value as a string. More... | |
|
noexcept |
Constructor.
Using this instance while the variable type or the game are deleted is undefined behavior.
| p0VarType | The type. Cannot be null. Must outlive the instance (usage). |
| p0Game | The game. Cannot be null. Must outlive the instance (usage). |
|
noexcept |
Get the value as a number.
|
inlinenoexcept |
Returns the type of the variable.
|
noexcept |
Get the value.
|
noexcept |
Add a value to the current value.
Doesn't check for overflows.
| nInc | The to be added value. |
|
noexcept |
Tells whether the variable changed in the current game tick.
|
noexcept |
Set the value.
If the variable is read-only, has no effect.
| nValue | The new value. |
|
noexcept |
The value as a string.
1.8.13