TIndexedContainerIterator

Generic iterator which can operate on types that expose the following:

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Containers/Array.h

Include

#include "Containers/Array.h"

Syntax

template<typename ContainerType, typename ElementType, typename SizeType>
class TIndexedContainerIterator

Remarks

Generic iterator which can operate on types that expose the following:

  • A type called ElementType representing the contained type.

  • A method SizeType Num() const that returns the number of items in the container.

  • A method bool IsValidIndex(SizeType index) which returns whether a given index is valid in the container.

  • A method T& operator[](SizeType index) which returns a reference to a contained object by index.

  • A method void RemoveAt(SizeType index) which removes the element at index

Constructors

Name Description

Public function

TIndexedContainerIterator

(
    ContainerType& InContainer,
    SizeType StartIndex
)

Functions

Name Description

Public function Const

SizeType

 

GetIndex()

Returns an index to the current element.

Public function

void

 

RemoveCurrent()

Removes current element in array.

Public function

void

 

Reset()

Resets the iterator to the first element.

Public function

void

 

SetToEnd()

Sets iterator to the last element.

Operators

Name Description

Public function Const

TIndexedCont...

 

operator-

(
    SizeType Offset
)

Public function

TIndexedCont...

 

operator--()

Moves iterator to the previous element in the container.

Public function

TIndexedCont...

 

operator--

(
    int
)

Public function Const

 

operator bool()

Conversion to "bool" returning true if the iterator has not reached the last element.

Public function Const

ElementType ...

 

operator*()

Public function Const

TIndexedCont...

 

operator+

(
    SizeType Offset
)

Public function

TIndexedCont...

 

operator++

(
    int
)

Public function

TIndexedCont...

 

operator++()

Advances iterator to the next element in the container.

Public function

TIndexedCont...

 

operator+=

(
    SizeType Offset
)

Iterator arithmetic support

Public function

TIndexedCont...

 

operator-=

(
    SizeType Offset
)

Public function Const

ElementType ...

 

operator->()

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss