Unnamed namespace. More...
Classes | |
class | EnumHash |
Functor for hashing Length::Unit values. More... | |
Functions | |
double | Convert (const ns3::Length::Quantity &from, ns3::Length::Unit toUnit) |
Convert a Length::Quantity to the equivalent value in another unit. | |
double | Convert (double value, ns3::Length::Unit fromUnit, ns3::Length::Unit toUnit) |
Convert a value in one unit to the equivalent value in another unit. | |
double | FootToMeter (double value) |
Convert a value in feet to the equivalent value in meters. | |
double | MeterToFoot (double value) |
Convert a value in meters to the equivalent value in feet. | |
template<class R > | |
double | MeterToUS (double value) |
Convert a value from meters to a US Customary unit (inches, feet, yards etc.) | |
template<class R > | |
double | ScaleValue (double value) |
Helper function to scale an input value by a given ratio. | |
template<class R > | |
double | USToMeter (double value) |
Convert a value from a US Customary unit (inches, feet, yards etc.) to meters. | |
Unnamed namespace.
double anonymous_namespace{length.cc}::Convert | ( | const ns3::Length::Quantity & | from, |
ns3::Length::Unit | toUnit ) |
Convert a Length::Quantity to the equivalent value in another unit.
from | Quantity with the current value and unit |
toUnit | Target unit |
Definition at line 195 of file length.cc.
References Convert(), ns3::Length::Quantity::Unit(), and ns3::Length::Quantity::Value().
double anonymous_namespace{length.cc}::Convert | ( | double | value, |
ns3::Length::Unit | fromUnit, | ||
ns3::Length::Unit | toUnit ) |
Convert a value in one unit to the equivalent value in another unit.
value | Length value in fromUnit units |
fromUnit | Unit of value |
toUnit | Target unit |
fromUnit
to toUnit
Helper to generate hash values from pairs of Length::Units
Definition at line 127 of file length.cc.
References FootToMeter(), MeterToFoot(), MeterToUS(), NS_FATAL_ERROR, ScaleValue(), and USToMeter().
Referenced by Convert().
Convert a value in feet to the equivalent value in meters.
value | Input value in feet |
Definition at line 63 of file length.cc.
Referenced by Convert(), and USToMeter().
Convert a value in meters to the equivalent value in feet.
value | Input value in meters |
Definition at line 76 of file length.cc.
Referenced by Convert(), and MeterToUS().
Convert a value from meters to a US Customary unit (inches, feet, yards etc.)
Value is converted to feet then scaled to the desired US Customary unit
R | std::ratio needed to convert feet to desired US customary unit |
value | Input value in meters |
Definition at line 112 of file length.cc.
References MeterToFoot(), and ScaleValue().
Referenced by Convert().
Helper function to scale an input value by a given ratio.
R | a std::ratio |
value | Input value to scale by R |
Definition at line 50 of file length.cc.
Referenced by Convert(), MeterToUS(), and USToMeter().
Convert a value from a US Customary unit (inches, feet, yards etc.) to meters.
Value is scaled to feet then converted to meters
R | std::ratio needed to convert value to feet |
value | Input value in some US Customary unit |
Definition at line 94 of file length.cc.
References FootToMeter(), and ScaleValue().
Referenced by Convert().