Skip To Content ArcGIS for Developers Sign In Dashboard

CodedValueDomain Class


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

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

Public Functions

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

Detailed Description

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


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


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

See also DomainType.

CodedValueDomain::CodedValueDomain(const CodedValueDomain &other)

Copy constructor from other CodedValueDomain.

CodedValueDomain::CodedValueDomain(CodedValueDomain &&other)

Move constructor from other CodedValueDomain.

CodedValueDomain::CodedValueDomain(const Domain &other)

Converting constructor from other Domain.

See also Downcast helper functions.



QList<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.

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

Assignment operator from other CodedValueDomain.

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

Move operator from other CodedValueDomain.

Feedback on this topic?