SST  14.1.0
StructuralSimulationToolkit
SST::Units Class Reference

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. More...
 
 Units (const Units &)=default
 Copy constructor.
 
Unitsoperator= (const Units &v)
 Assignment operator.
 
Unitsoperator*= (const Units &v)
 Self-multiplication operator.
 
Unitsoperator/= (const Units &v)
 Self-division operator.
 
bool operator== (const Units &lhs) const
 Equality Operator.
 
bool operator!= (const Units &lhs) const
 Inequality Operator.
 
Unitsinvert ()
 Perform a reciprocal operation. More...
 
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
 

Detailed Description

Helper class internal to UnitAlgebra.

Contains information on valid units

Constructor & Destructor Documentation

◆ 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.

Parameters
unitsString representing the new unit
multiplierValue by which to multiply to get to this unit

Member Function Documentation

◆ invert()

Units & Units::invert ( )

Perform a reciprocal operation.

Numerator and Denominator swap.


The documentation for this class was generated from the following files: