Skip To Content ArcGIS for Developers Sign In Dashboard

FeatureIterator Class

(Esri::ArcGISRuntime::FeatureIterator)

An iterator for a collection of features. More...

Header: #include <FeatureIterator>
Since: Esri::ArcGISRuntime 100.0

Public Functions

FeatureIterator()
FeatureIterator(const FeatureIterator &other)
FeatureIterator(FeatureIterator &&other)
~FeatureIterator()
QList<Feature *> features(QObject *parent = nullptr) const
bool hasNext() const
bool isEmpty() const
Feature *next(QObject *parent = nullptr) const
void reset()
FeatureIterator &operator=(const FeatureIterator &other)
FeatureIterator &operator=(FeatureIterator &&other)

Detailed Description

An iterator for a collection of features.

See also FeatureLayer and FeatureQueryResult.

Member Function Documentation

FeatureIterator::FeatureIterator()

Default Constructor. Create an empty FeatureIterator instance.

FeatureIterator::FeatureIterator(const FeatureIterator &other)

Copy constructor from other FeatureIterator.

FeatureIterator::FeatureIterator(FeatureIterator &&other)

Move constructor from other FeatureIterator.

FeatureIterator::~FeatureIterator()

Destructor

QList<Feature *> FeatureIterator::features(QObject *parent = nullptr) const

Returns all features in the iterator at once as a list of Feature objects, with an optional parent.

All features in this iterator are returned in the list, regardless of whether any features were already accessed through this iterator. After this call, this FeatureIterator will point past the last feature in the iterator. To start over reading features from the beginning of this iterator, call reset.

The parent of the Feature objects in the list will be the specified parent object. If no parent object is specified, the creator of the returned FeatureIterator (either an instance of FeatureLayer or FeatureQueryResult) will be the parent.

bool FeatureIterator::hasNext() const

Returns true if there is another feature available.

bool FeatureIterator::isEmpty() const

Returns true if this FeatureIterator is empty.

Feature *FeatureIterator::next(QObject *parent = nullptr) const

Returns the next feature providing an optional parent.

If no parent is specified, the creator of the FeatureIterator (either an instance of FeatureLayer or FeatureQueryResult) takes ownership of the returned feature.

void FeatureIterator::reset()

Points the iterator back to the front.

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

Assignment operator from other FeatureIterator.

FeatureIterator &FeatureIterator::operator=(FeatureIterator &&other)

Move operator from other FeatureIterator.


Feedback on this topic?