|
SST 16.1.0
Structural Simulation Toolkit
|
Helper class internal to UnitAlgebra. More...
#include <unitAlgebra.h>
Public Member Functions | |
| Units (const std::string &units, sst_big_num &multiplier) | |
| Create a new instantiation of a Units with a base unit string, and multiplier. | |
| Units (const Units &)=default | |
| Copy constructor. | |
| Units & | operator= (const Units &v)=default |
| Assignment operator. | |
| Units & | operator*= (const Units &v) |
| Self-multiplication operator. | |
| Units & | operator/= (const Units &v) |
| Self-division operator. | |
| bool | operator== (const Units &lhs) const |
| Equality Operator. | |
| bool | operator!= (const Units &lhs) const |
| Inequality Operator. | |
| Units & | invert () |
| Perform a reciprocal operation. | |
| std::string | toString () const |
| Return a String representation if this Unit. | |
Static Public Member Functions | |
| static void | registerBaseUnit (const std::string &u) |
| Create a new Base Unit type. | |
| static void | registerCompoundUnit (const std::string &u, const std::string &v) |
| Create a new Compound Unit type. | |
Friends | |
| class | UnitAlgebra |
Helper class internal to UnitAlgebra.
Contains information on valid units
| Units::Units | ( | const std::string & | units, |
| sst_big_num & | multiplier ) |
Create a new instantiation of a Units with a base unit string, and multiplier.
| units | String representing the new unit |
| multiplier | Value by which to multiply to get to this unit |
Referenced by operator!=(), operator*=(), operator/=(), operator=(), operator==(), registerCompoundUnit(), and Units().
|
default |
Copy constructor.
References Units().
| Units & Units::invert | ( | ) |
Perform a reciprocal operation.
Numerator and Denominator swap.
|
inline |
Inequality Operator.
References Units().
Assignment operator.
References operator*=(), operator/=(), operator==(), and Units().
| bool Units::operator== | ( | const Units & | lhs | ) | const |
|
static |
Create a new Compound Unit type.
References Units().
| std::string Units::toString | ( | ) | const |
Return a String representation if this Unit.
Referenced by SST::UnitAlgebra::operator+=(), SST::UnitAlgebra::operator-=(), SST::UnitAlgebra::operator<(), SST::UnitAlgebra::operator<=(), SST::UnitAlgebra::operator>(), and SST::UnitAlgebra::operator>=().