BashSpark
Loading...
Searching...
No Matches
bs::math_parser::expvar Struct Reference

Structure to hold variable information in sequence functions. More...

Public Member Functions

bool get_value (const std::string &sValue, std::int64_t &oValue) const
 Gets the value of a variable.
 
std::int64_t & operator[] (const std::string_view &sValue)
 Access a variable value, if not set default value is 0.
 

Public Attributes

std::unordered_map< std::string_view, std::int64_t, shell_hash_viewm_mVariables
 Map holding the pairs of variable, value.
 

Detailed Description

Structure to hold variable information in sequence functions.

Member Function Documentation

◆ get_value()

bool bs::math_parser::expvar::get_value ( const std::string &  sValue,
std::int64_t &  oValue 
) const
inline

Gets the value of a variable.

Parameters
sValueValue to get
oValueVariable to set the value (only set if found)
Returns
Whether the variable exits

◆ operator[]()

std::int64_t & bs::math_parser::expvar::operator[] ( const std::string_view &  sValue)
inline

Access a variable value, if not set default value is 0.

Parameters
sValueValue to access
Returns
Reference to value of variable

The documentation for this struct was generated from the following file: