| FNSS ns-3 adapter
    ns-3 adapter for the Fast Network Simulation Setup (FNSS) toolchain | 
#include <quantity.h>
| Public Member Functions | |
| Quantity (const double &value, const std::string &unit, const MeasurementUnit &converter) | |
| Quantity (const double &value, const MeasurementUnit &converter) | |
| Quantity (const std::string &str, const MeasurementUnit &converter) | |
| Quantity (const MeasurementUnit &converter) | |
| void | fromString (const std::string &str) | 
| std::string | toString (const std::string &separator="") const | 
| void | convert (const std::string &unit) | 
| double | getValue () const | 
| void | setValue (const double &value) | 
| std::string | getUnit () const | 
| void | setUnit (const std::string &unit) | 
| const MeasurementUnit & | getMeasurementUnit () const | 
| Quantity & | operator= (const Quantity &other) | 
| bool | operator< (const Quantity &other) const | 
| bool | operator<= (const Quantity &other) const | 
| bool | operator> (const Quantity &other) const | 
| bool | operator>= (const Quantity &other) const | 
| bool | operator== (const Quantity &other) const | 
Models a quantity and allows for conversions between measurement units of the same type.
| fnss::Quantity::Quantity | ( | const double & | value, | 
| const std::string & | unit, | ||
| const MeasurementUnit & | converter | ||
| ) | 
Constructor with explicit numerical value and unit.
| value | the numeric value of the quantity. | 
| unit | the value of the quantity's unit. | 
| converter | the MeasurementUnitobject used for conversions. The object is not copied, only the reference is stored. | 
| fnss::Quantity::Quantity | ( | const double & | value, | 
| const MeasurementUnit & | converter | ||
| ) | 
Constructor with explicit numerical value.
The unit is assigned to the base of this->converter. Mainly declared to avoid calls of the type Quantity(0, someUnit) that would otherwise match the string constructor.
| value | the numeric value of the quantity. | 
| converter | the MeasurementUnitobject used for conversions. The object is not copied, only the reference is stored. | 
| fnss::Quantity::Quantity | ( | const std::string & | str, | 
| const MeasurementUnit & | converter | ||
| ) | 
Constructor that parses a string to obtain the numerical value and unit.
If not provided in the input, the unit is assumed to be the base of this->converter.
| str | the std::stringto be parsed for value and unit data. | 
| converter | the MeasurementUnitobject used for conversions. The object is not copied, only the reference is stored. | 
| fnss::Quantity::Quantity | ( | const MeasurementUnit & | converter | ) | 
Constructor.
| converter | the MeasurementUnitobject used for conversions. The object is not copied, only the reference is stored. | 
| void fnss::Quantity::convert | ( | const std::string & | unit | ) | 
Convert to the specified unit(eg. from GB/s to Tb/h).
| unit | the unit to convert to. | 
| void fnss::Quantity::fromString | ( | const std::string & | str | ) | 
Parse a string to obtain the numerical value and unit. The previously stored data is discarded.
| str | the std::stringto be parsed for value and unit data. | 
| const MeasurementUnit & fnss::Quantity::getMeasurementUnit | ( | ) | const | 
Get a const reference to the MeasurementUnit object that  is using for conversions.
const reference to the MeasurementUnit object being used. | std::string fnss::Quantity::getUnit | ( | ) | const | 
Get method for the unit of the quantity.
| double fnss::Quantity::getValue | ( | ) | const | 
Get method for the numerical value of the quantity.
| bool fnss::Quantity::operator< | ( | const Quantity & | other | ) | const | 
Comparison operator that takes into account the quantity's measurement unit.
| bool fnss::Quantity::operator<= | ( | const Quantity & | other | ) | const | 
Comparison operator that takes into account the quantity's measurement unit.
Assignment operator.
Throws an exception if the MeasurementUnit reference of the other object has a different base from the MeasurementUnit reference of . 
| bool fnss::Quantity::operator== | ( | const Quantity & | other | ) | const | 
Comparison operator that takes into account the quantity's measurement unit.
| bool fnss::Quantity::operator> | ( | const Quantity & | other | ) | const | 
Comparison operator that takes into account the quantity's measurement unit.
| bool fnss::Quantity::operator>= | ( | const Quantity & | other | ) | const | 
Comparison operator that takes into account the quantity's measurement unit.
| void fnss::Quantity::setUnit | ( | const std::string & | unit | ) | 
Set method for the unit of the quantity.
| unit | the unit to set. | 
| void fnss::Quantity::setValue | ( | const double & | value | ) | 
Set method for the numerical value of the quantity.
| value | the numerical value to set. | 
| std::string fnss::Quantity::toString | ( | const std::string & | separator = "" | ) | const | 
Obtain a string representation of the object(eg. "5 GB/s").
If not provided in the input, the unit is assumed to be the base of this->converter.
| separator | the std::theseparator to insert between value and unit. | 
std::string representation of the object.  1.8.6
 1.8.6