stmm-games-doc  0.32.0
Public Member Functions | Static Public Member Functions | List of all members
stmg::Variable::Value Class Reference

The formatted representation of a variable's value. More...

Public Member Functions

int32_t get () const noexcept
 The value as an integer. More...
 
VARIABLE_FORMAT getFormat () const noexcept
 The format. More...
 
std::string toFormattedString () const noexcept
 Return the formatted string. More...
 
bool isValid () const noexcept
 Whether the variable is valid. More...
 

Static Public Member Functions

static Value create (int32_t nValue, VARIABLE_FORMAT eFormat) noexcept
 Create a value. More...
 

Detailed Description

The formatted representation of a variable's value.

Member Function Documentation

◆ create()

static Value stmg::Variable::Value::create ( int32_t  nValue,
VARIABLE_FORMAT  eFormat 
)
staticnoexcept

Create a value.

Parameters
nValueThe integer value.
eFormatThe format.
Returns
The value object.

◆ get()

int32_t stmg::Variable::Value::get ( ) const
inlinenoexcept

The value as an integer.

◆ getFormat()

VARIABLE_FORMAT stmg::Variable::Value::getFormat ( ) const
inlinenoexcept

The format.

◆ isValid()

bool stmg::Variable::Value::isValid ( ) const
noexcept

Whether the variable is valid.

Checks that the format is valid.

◆ toFormattedString()

std::string stmg::Variable::Value::toFormattedString ( ) const
noexcept

Return the formatted string.