Skip To Content ArcGIS for Developers Sign In Dashboard

CodedValueDomain Class

class Esri::ArcGISRuntime::CodedValueDomain

A domain which specifies an explicit set of valid values for a field. More...

Header: #include <CodedValueDomain>
Since: Esri::ArcGISRuntime 100.0
Inherits: Esri::ArcGISRuntime::Domain

This class was introduced in Esri::ArcGISRuntime 100.0.

Public Functions

CodedValueDomain(const Esri::ArcGISRuntime::Domain &other)
CodedValueDomain(Esri::ArcGISRuntime::CodedValueDomain &&other)
CodedValueDomain(const Esri::ArcGISRuntime::CodedValueDomain &other)
CodedValueDomain()
Esri::ArcGISRuntime::CodedValueDomain &operator=(Esri::ArcGISRuntime::CodedValueDomain &&other)
Esri::ArcGISRuntime::CodedValueDomain &operator=(const Esri::ArcGISRuntime::CodedValueDomain &other)
~CodedValueDomain()
QList<Esri::ArcGISRuntime::CodedValue> codedValues() const
bool isValid() const

Detailed Description

Example:

Obtain coded values from a field's CodedValueDomain:

// Create service feature table
ServiceFeatureTable* featureTable = new ServiceFeatureTable(serviceUrl1, this);

// Connect to loadStatusChanged signal to access fields once loaded
connect(featureTable, &ServiceFeatureTable::loadStatusChanged, [featureTable](LoadStatus loadStatus)
{
    if (loadStatus == LoadStatus::Loaded)
    {
        Field field = featureTable->field("PRIMCAUSE");
        CodedValueDomain codedValueDomain = static_cast<CodedValueDomain>(field.domain());
        QString codedValue1 = codedValueDomain.codedValues().at(0).name();
        QString codedValue2 = codedValueDomain.codedValues().at(1).name();
        QString codedValue3 = codedValueDomain.codedValues().at(2).name();
        QString codedValue4 = codedValueDomain.codedValues().at(3).name();
    }
});

See also CodedValue.

Member Function Documentation

CodedValueDomain::CodedValueDomain(const Esri::ArcGISRuntime::Domain &other)

Converting constructor from other Domain.

See also Downcast helper functions.

CodedValueDomain::CodedValueDomain(Esri::ArcGISRuntime::CodedValueDomain &&other)

Move constructor from other CodedValueDomain.

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

Copy constructor from other CodedValueDomain.

CodedValueDomain::CodedValueDomain()

Default constructor. Creates an empty and invalid CodedValueDomain with domainType DomainType::Unknown.

See also DomainType.

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

Move operator from other CodedValueDomain.

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

Assignment operator from other CodedValueDomain.

CodedValueDomain::~CodedValueDomain()

Destructor.

QList<Esri::ArcGISRuntime::CodedValue> CodedValueDomain::codedValues() const

Returns an explicit set of valid values for a field.

The coded values of this domain. Each valid value is assigned a unique name.

bool CodedValueDomain::isValid() const

Gets whether this CodedValueDomain is valid.

A CodedValueDomain is valid if it is not empty and domainType is DomainType::CodedValueDomain.

Returns true if valid.

This function was introduced in Esri::ArcGISRuntime 100.2.


Feedback on this topic?