LinearUnit Class

  • LinearUnit
  • class Esri::ArcGISRuntime::LinearUnit

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

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

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

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

    Static Public Members

    Esri::ArcGISRuntime::LinearUnit feet()
    Esri::ArcGISRuntime::LinearUnit kilometers()
    Esri::ArcGISRuntime::LinearUnit meters()
    Esri::ArcGISRuntime::LinearUnit miles()

    Detailed Description

    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(const Esri::ArcGISRuntime::Unit &other)

    Converting constructor from other Unit.

    See also Downcast helper functions.

    LinearUnit::LinearUnit(Esri::ArcGISRuntime::LinearUnit &&other)

    Move constructor from other LinearUnit.

    LinearUnit::LinearUnit(const Esri::ArcGISRuntime::LinearUnit &other)

    Copy constructor from other LinearUnit.

    LinearUnit::LinearUnit(Esri::ArcGISRuntime::LinearUnitId linearUnitId)

    Creates a LinearUnit representing the specified linearUnitId.

    LinearUnit::LinearUnit(const Esri::ArcGISRuntime::AreaUnit &areaUnit)

    Creates a LinearUnit from an areaUnit.

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

    LinearUnit::LinearUnit()

    Default constructor.

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

    Move operator from other LinearUnit.

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

    Assignment operator from other LinearUnit.

    [override virtual] LinearUnit::~LinearUnit()

    Destructor.

    double LinearUnit::convertFrom(const Esri::ArcGISRuntime::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 Esri::ArcGISRuntime::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] Esri::ArcGISRuntime::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] Esri::ArcGISRuntime::LinearUnit LinearUnit::kilometers()

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

    Esri::ArcGISRuntime::LinearUnitId LinearUnit::linearUnitId() const

    Returns the LinearUnitId corresponding to this LinearUnit.

    [static] Esri::ArcGISRuntime::LinearUnit LinearUnit::meters()

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

    [static] Esri::ArcGISRuntime::LinearUnit LinearUnit::miles()

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

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.