ImmutablePartCollection Class

  • ImmutablePartCollection
  • class Esri::ArcGISRuntime::ImmutablePartCollection

    Represents an immutable collection of parts for a polygon or polyline geometry. Each part is a collection of segments. More...

    Header: #include <ImmutablePartCollection.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::Iterable

    Public Functions

    ImmutablePartCollection()
    ImmutablePartCollection(const Esri::ArcGISRuntime::ImmutablePartCollection &other)
    ImmutablePartCollection(Esri::ArcGISRuntime::ImmutablePartCollection &&other)
    virtual ~ImmutablePartCollection() override
    int indexOf(const Esri::ArcGISRuntime::ImmutablePart &part) const
    bool isEmpty() const
    Esri::ArcGISRuntime::ImmutablePart part(int index) const
    Esri::ArcGISRuntime::SpatialReference spatialReference() const
    Esri::ArcGISRuntime::ImmutablePartCollection &operator=(const Esri::ArcGISRuntime::ImmutablePartCollection &other)
    Esri::ArcGISRuntime::ImmutablePartCollection &operator=(Esri::ArcGISRuntime::ImmutablePartCollection &&other)

    Reimplemented Public Functions

    virtual int size() const override

    Detailed Description

    Polygons and polyline can have multiple disjoint parts. Each part is represented by an ImmutablePart. A part is composed of segments representing the edge of the polygon or polyline.

    Use the ImmutablePartCollection returned from the Multipart getParts method to iterate through all of the parts in a Multipart.

    Because geometries themselves are immutable, the collections they are composed of are also immutable. For geometry editing or creation workflows, a mutable PartCollection is used instead. PartCollection has constructors that take an ImmutablePartCollection, allowing creation of new geometries from parts of existing ones.

    Member Function Documentation

    ImmutablePartCollection::ImmutablePartCollection()

    Default constructor.

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

    Copy constructor from other ImmutablePartCollection.

    ImmutablePartCollection::ImmutablePartCollection(Esri::ArcGISRuntime::ImmutablePartCollection &&other)

    Move constructor from other ImmutablePartCollection.

    [override virtual] ImmutablePartCollection::~ImmutablePartCollection()

    Destructor.

    int ImmutablePartCollection::indexOf(const Esri::ArcGISRuntime::ImmutablePart &part) const

    Retrieves the position of the given part in the immutable part collection.

    • part - The part you want to find.

    bool ImmutablePartCollection::isEmpty() const

    Returns if the immutable part collection contains no parts.

    Esri::ArcGISRuntime::ImmutablePart ImmutablePartCollection::part(int index) const

    Returns a part at the specified index in the immutable part collection.

    A part is represented by an immutable collection of segments.

    • index - Position to retrieve the part.

    [override virtual] int ImmutablePartCollection::size() const

    Returns the number of parts in the immutable part collection.

    Esri::ArcGISRuntime::SpatialReference ImmutablePartCollection::spatialReference() const

    Returns the spatial reference for the immutable part collection.

    If the collection does not have a spatial reference, empty is returned.

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

    Assignment operator from other ImmutablePartCollection.

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

    Move operator from other ImmutablePartCollection.

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

    You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

    Your ArcGIS portal

    Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

    Your ArcGIS Location Platform dashboard

    Manage billing, monitor service usage, and access additional resources.

    Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

    Close