AreaUnit Class

  • AreaUnit
  • class Esri::ArcGISRuntime::AreaUnit

    Indicates the units of measurement of an instance of AreaUnit, or area measurement operation. More...

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

    Public Functions

    AreaUnit()
    AreaUnit(Esri::ArcGISRuntime::AreaUnitId areaUnitId)
    AreaUnit(const Esri::ArcGISRuntime::LinearUnit &linearUnit)
    AreaUnit(const Esri::ArcGISRuntime::AreaUnit &other)
    AreaUnit(Esri::ArcGISRuntime::AreaUnit &&other)
    AreaUnit(const Esri::ArcGISRuntime::Unit &other)
    virtual ~AreaUnit() override
    Esri::ArcGISRuntime::AreaUnitId areaUnitId() const
    double convertFrom(const Esri::ArcGISRuntime::AreaUnit &fromUnit, double area) const
    double convertFromSquareMeters(double squareMeters) const
    double convertTo(const Esri::ArcGISRuntime::AreaUnit &toUnit, double area) const
    double convertToSquareMeters(double thisUnitValue) const
    bool isValid() const
    Esri::ArcGISRuntime::AreaUnit &operator=(const Esri::ArcGISRuntime::AreaUnit &other)
    Esri::ArcGISRuntime::AreaUnit &operator=(Esri::ArcGISRuntime::AreaUnit &&other)

    Static Public Members

    Esri::ArcGISRuntime::AreaUnit squareFeet()
    Esri::ArcGISRuntime::AreaUnit squareKilometers()
    Esri::ArcGISRuntime::AreaUnit squareMeters()
    Esri::ArcGISRuntime::AreaUnit squareMiles()

    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

    AreaUnit::AreaUnit()

    Default constructor.

    [explicit] AreaUnit::AreaUnit(Esri::ArcGISRuntime::AreaUnitId areaUnitId)

    Creates a unit given its known id.

    • areaUnitId - The known id of the unit.

    [explicit, since Esri::ArcGISRuntime 100.6] AreaUnit::AreaUnit(const Esri::ArcGISRuntime::LinearUnit &linearUnit)

    Creates an area unit given a linear unit.

    • linearUnit - The linear unit.

    This function was introduced in Esri::ArcGISRuntime 100.6.

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

    Copy constructor from other AreaUnit.

    AreaUnit::AreaUnit(Esri::ArcGISRuntime::AreaUnit &&other)

    Move constructor from other AreaUnit.

    [explicit] AreaUnit::AreaUnit(const Esri::ArcGISRuntime::Unit &other)

    Converting constructor from other Unit.

    See also Downcast helper functions.

    [override virtual] AreaUnit::~AreaUnit()

    Destructor.

    Esri::ArcGISRuntime::AreaUnitId AreaUnit::areaUnitId() const

    Returns the AreaUnitId of the given Area unit.

    If an error occurs then AreaUnitId::Other is returned.

    double AreaUnit::convertFrom(const Esri::ArcGISRuntime::AreaUnit &fromUnit, double area) const

    Returns converts a value in another UOM into this UOM.

    • fromUnit - The UOM to convert from.
    • area - The value to convert.

    double AreaUnit::convertFromSquareMeters(double squareMeters) const

    Converts a square meter value to this UOM.

    • squareMeters - The value to convert.

    double AreaUnit::convertTo(const Esri::ArcGISRuntime::AreaUnit &toUnit, double area) const

    Returns converts a value in this UOM into another UOM.

    • toUnit - The UOM to convert to.
    • area - The value to convert.

    double AreaUnit::convertToSquareMeters(double thisUnitValue) const

    Converts a value in this UOM to square meters.

    • thisUnitValue - The value to convert.

    [since Esri::ArcGISRuntime 100.2] bool AreaUnit::isValid() const

    Gets whether this AreaUnit is valid.

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

    Returns true if valid.

    This function was introduced in Esri::ArcGISRuntime 100.2.

    [static] Esri::ArcGISRuntime::AreaUnit AreaUnit::squareFeet()

    Returns an AreaUnit object representing square feet (AreaUnitId::SquareFeet).

    [static] Esri::ArcGISRuntime::AreaUnit AreaUnit::squareKilometers()

    Returns an AreaUnit object representing square kilometers (AreaUnitId::SquareKilometers).

    [static] Esri::ArcGISRuntime::AreaUnit AreaUnit::squareMeters()

    Returns an AreaUnit object representing square meters (AreaUnitId::SquareMeters).

    [static] Esri::ArcGISRuntime::AreaUnit AreaUnit::squareMiles()

    Returns an AreaUnit object representing square miles (AreaUnitId::SquareMiles).

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

    Assignment operator from other AreaUnit.

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

    Move operator from other AreaUnit.

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