Determine the unit of a string encoded value.
More...
|
double | value |
| The magnitude of the value.
|
|
Unit | unit |
| The unit of the value.
|
|
Determine the unit of a string encoded value.
◆ Value()
anonymous_namespace{clas.cpp}::Value::Value |
( |
char const *const |
valp, |
|
|
char * |
unitp = nullptr |
|
) |
| |
|
inline |
Construct value from a null terminated character array.
- Parameters
-
valp | A pointer to the value portion of the array |
unitp | Set by the constructor to point behind the magnitude |
◆ operator double()
anonymous_namespace{clas.cpp}::Value::operator double |
( |
| ) |
const |
|
inline |
Implicitly cast to the magnitude.
- Returns
- The magnitude of the value
◆ operator Unit()
anonymous_namespace{clas.cpp}::Value::operator Unit |
( |
| ) |
const |
|
inline |
Implicitly cast to the unit.
- Returns
- The unit of the value
◆ operator*=()
Value& anonymous_namespace{clas.cpp}::Value::operator*= |
( |
double const |
fact | ) |
|
|
inline |
Scale magnitude by the given factor.
- Parameters
-
fact | The factor to scale the magnitude by |
- Returns
- A self reference
◆ operator+=()
Value& anonymous_namespace{clas.cpp}::Value::operator+= |
( |
double const |
off | ) |
|
|
inline |
Add offset to the magnitude.
- Parameters
-
- Returns
- A self reference
◆ operator-=()
Value& anonymous_namespace{clas.cpp}::Value::operator-= |
( |
double const |
off | ) |
|
|
inline |
Subtract offset from the magnitude.
- Parameters
-
- Returns
- A self reference
◆ operator/=()
Value& anonymous_namespace{clas.cpp}::Value::operator/= |
( |
double const |
div | ) |
|
|
inline |
Divide the magnitude by the given divisor.
- Parameters
-
div | The divisor to divide the magnitude by |
- Returns
- A self reference
The documentation for this struct was generated from the following file: