ns3::Length implementation More...
#include "ns3/length.h"#include "ns3/log.h"#include <algorithm>#include <array>#include <cctype>#include <cmath>#include <functional>#include <limits>#include <map>#include <ratio>#include <sstream>#include <string>#include <type_traits>#include <unordered_map>#include <vector>
Include dependency graph for length.cc:Go to the source code of this file.
Classes | |
| class | anonymous_namespace{length.cc}::EnumHash |
| Functor for hashing Length::Unit values. More... | |
Namespaces | |
| namespace | anonymous_namespace{length.cc} |
| Unnamed namespace. | |
| namespace | ns3 |
| Every class exported by the ns3 library is enclosed in the ns3 namespace. | |
Functions | |
| ns3::ATTRIBUTE_HELPER_CPP (Length) | |
| 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. More... | |
| 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. More... | |
| int64_t | ns3::Div (const Length &numerator, const Length &denominator, Length *remainder=nullptr) |
Calculate how many times numerator can be split into denominator sized pieces. More... | |
| double | anonymous_namespace{length.cc}::FootToMeter (double value) |
| Convert a value in feet to the equivalent value in meters. More... | |
| std::optional< Length::Unit > | ns3::FromString (std::string unitString) |
| Find the equivalent Length::Unit for a unit string. More... | |
| double | anonymous_namespace{length.cc}::MeterToFoot (double value) |
| Convert a value in meters to the equivalent value in feet. More... | |
| template<class R > | |
| double | anonymous_namespace{length.cc}::MeterToUS (double value) |
| Convert a value from meters to a US Customary unit (inches, feet, yards etc.) More... | |
| Length | ns3::Mod (const Length &numerator, const Length &denominator) |
| Calculate the amount remaining after dividing two lengths. More... | |
| bool | ns3::operator!= (const Length &left, const Length &right) |
| Compare two length objects for inequality. More... | |
| Length | ns3::operator* (const Length &l, double scalar) |
| Multiply a length value by a scalar. More... | |
| Length | ns3::operator* (double scalar, const Length &l) |
| Multiply a length value by a scalar. More... | |
| Length | ns3::operator+ (const Length &left, const Length &right) |
| Add two length values together. More... | |
| Length | ns3::operator- (const Length &left, const Length &right) |
| Subtract two length values. More... | |
| Length | ns3::operator/ (const Length &left, double scalar) |
| Divide a length value by a scalar. More... | |
| double | ns3::operator/ (const Length &numerator, const Length &denominator) |
| Divide a length value by another length value. More... | |
| bool | ns3::operator< (const Length &left, const Length &right) |
Check if left has a value less than right. More... | |
| std::ostream & | ns3::operator<< (std::ostream &stream, const Length &l) |
| Write a length value to an output stream. More... | |
| std::ostream & | ns3::operator<< (std::ostream &stream, const Length::Quantity &q) |
| Write a Quantity to an output stream. More... | |
| std::ostream & | ns3::operator<< (std::ostream &stream, Length::Unit unit) |
| Write a Length::Unit to an output stream. More... | |
| bool | ns3::operator<= (const Length &left, const Length &right) |
Check if left has a value less than or equal to right. More... | |
| bool | ns3::operator== (const Length &left, const Length &right) |
| Compare two length objects for equality. More... | |
| bool | ns3::operator> (const Length &left, const Length &right) |
Check if left has a value greater than right. More... | |
| bool | ns3::operator>= (const Length &left, const Length &right) |
Check if left has a value greater than or equal to right. More... | |
| std::istream & | ns3::operator>> (std::istream &stream, Length &l) |
| Read a length value from an input stream. More... | |
| std::tuple< bool, double, std::string > | ns3::ParseLengthString (const std::string &input) |
| This function provides a string parsing method that does not rely on istream, which has been found to have different behaviors in different implementations. More... | |
| template<class R > | |
| double | anonymous_namespace{length.cc}::ScaleValue (double value) |
| Helper function to scale an input value by a given ratio. More... | |
| std::string | ns3::ToName (Length::Unit unit, bool plural=false) |
| Return the name of the supplied unit. More... | |
| std::string | ns3::ToSymbol (Length::Unit unit) |
| Return the symbol of the supplied unit. More... | |
| template<class R > | |
| double | anonymous_namespace{length.cc}::USToMeter (double value) |
| Convert a value from a US Customary unit (inches, feet, yards etc.) to meters. More... | |
| Length | ns3::CentiMeters (double value) |
| Construct a length from a value in the indicated unit. More... | |
| Length | ns3::Feet (double value) |
| Construct a length from a value in the indicated unit. More... | |
| Length | ns3::Inches (double value) |
| Construct a length from a value in the indicated unit. More... | |
| Length | ns3::KiloMeters (double value) |
| Construct a length from a value in the indicated unit. More... | |
| Length | ns3::Meters (double value) |
| Construct a length from a value in the indicated unit. More... | |
| Length | ns3::MicroMeters (double value) |
| Construct a length from a value in the indicated unit. More... | |
| Length | ns3::Miles (double value) |
| Construct a length from a value in the indicated unit. More... | |
| Length | ns3::MilliMeters (double value) |
| Construct a length from a value in the indicated unit. More... | |
| Length | ns3::NanoMeters (double value) |
| Construct a length from a value in the indicated unit. More... | |
| Length | ns3::NauticalMiles (double value) |
| Construct a length from a value in the indicated unit. More... | |
| Length | ns3::Yards (double value) |
| Construct a length from a value in the indicated unit. More... | |
ns3::Length implementation
Definition in file length.cc.