Skip To Content ArcGIS for Developers Sign In Dashboard

LinearUnit Class

(Esri::ArcGISRuntime::LinearUnit)

Indicates the specific units of measurement of an instance of LinearUnit, or linear measurement operation. More...

Header: #include <LinearUnit>
Since: Esri::ArcGISRuntime 100.0
Inherits: Unit

Public Functions

LinearUnit()
LinearUnit(const AreaUnit &areaUnit)
LinearUnit(LinearUnitId linearUnitId)
LinearUnit(const LinearUnit &other)
LinearUnit(LinearUnit &&other)
LinearUnit(const Unit &other)
~LinearUnit()
double convertFrom(const LinearUnit &fromUnit, double value) const
double convertFromMeters(double meters) const
double convertTo(const LinearUnit &toUnit, double value) const
double convertToMeters(double thisUnitValue) const
bool isValid() const
LinearUnitId linearUnitId() const
LinearUnit &operator=(const LinearUnit &other)
LinearUnit &operator=(LinearUnit &&other)

Static Public Members

LinearUnit feet()
LinearUnit kilometers()
LinearUnit meters()
LinearUnit miles()

Detailed Description

Indicates the specific units of measurement of an instance of LinearUnit, or linear measurement operation.

Instances of classes that inherit from the Units class, like this one does, are initialized as a specific unit of measurement. Each instance has properties for the unit name (singular, plural and abbreviated) and provides methods for unit conversion.

Member Function Documentation

LinearUnit::LinearUnit()

Default constructor.

LinearUnit::LinearUnit(const AreaUnit &areaUnit)

Creates a LinearUnit from an areaUnit.

For example, if areaUnit is AreaUnitId::SquareMeter, the new LinearUnit will be LinearUnitId::Meter.

LinearUnit::LinearUnit(LinearUnitId linearUnitId)

Creates a LinearUnit representing the specified linearUnitId.

LinearUnit::LinearUnit(const LinearUnit &other)

Copy constructor from other LinearUnit.

LinearUnit::LinearUnit(LinearUnit &&other)

Move constructor from other LinearUnit.

LinearUnit::LinearUnit(const Unit &other)

Converting constructor from other Unit.

See also Downcast helper functions.

LinearUnit::~LinearUnit()

Destructor.

double LinearUnit::convertFrom(const LinearUnit &fromUnit, double value) const

Returns the linear value converted from another LinearUnit (fromUnit) into this LinearUnit.

double LinearUnit::convertFromMeters(double meters) const

Returns the linear value meters converted from meters into this LinearUnit.

double LinearUnit::convertTo(const LinearUnit &toUnit, double value) const

Returns the linear value converted from this LinearUnit into toUnit units.

double LinearUnit::convertToMeters(double thisUnitValue) const

Returns the linear value thisUnitValue converted from this LinearUnit into meters.

[static] LinearUnit LinearUnit::feet()

Returns an LinearUnit object representing feet (LinearUnitId::Feet).

bool LinearUnit::isValid() const

Gets whether this LinearUnit is valid.

A LinearUnit is valid if it is not empty and unitType is UnitType::LinearUnit.

Returns true if valid.

This function was introduced in Esri::ArcGISRuntime 100.2.

[static] LinearUnit LinearUnit::kilometers()

Returns an LinearUnit object representing kilometers (LinearUnitId::Kilometers).

LinearUnitId LinearUnit::linearUnitId() const

Returns the LinearUnitId corresponding to this LinearUnit.

[static] LinearUnit LinearUnit::meters()

Returns an LinearUnit object representing meters (LinearUnitId::Meters).

[static] LinearUnit LinearUnit::miles()

Returns an LinearUnit object representing miles (LinearUnitId::Miles).

LinearUnit &LinearUnit::operator=(const LinearUnit &other)

Assignment operator from other LinearUnit.

LinearUnit &LinearUnit::operator=(LinearUnit &&other)

Move operator from other LinearUnit.


Feedback on this topic?