Navigation
API > API/Runtime > API/Runtime/Core
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& operatorSizeType index which returns a reference to a contained object by index.
- A method void RemoveAt(SizeType index) which removes the element at index
| Name | TIndexedContainerIterator |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/Array.h |
| Include Path | #include "Containers/Array.h" |
Syntax
template<typename ContainerType, typename ElementType, typename SizeType>
class TIndexedContainerIterator
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TIndexedContainerIterator
(
ContainerType& InContainer, |
Containers/Array.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Container | ContainerType & | Containers/Array.h | ||
| Index | SizeType | Containers/Array.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SizeType GetIndex() |
Returns an index to the current element. | Containers/Array.h | |
void RemoveCurrent () |
Removes current element in array. | Containers/Array.h | |
void RemoveCurrentSwap () |
Removes current element in array by swapping it with the end element and popping it from the end. | Containers/Array.h | |
void Reset() |
Resets the iterator to the first element. | Containers/Array.h | |
void SetToEnd() |
Sets the iterator to one past the last element. | Containers/Array.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TIndexedContainerIterator operator-
(
SizeType Offset |
Containers/Array.h | ||
TIndexedContainerIterator & operator--() |
Moves iterator to the previous element in the container. | Containers/Array.h | |
TIndexedContainerIterator operator--
(
int |
Containers/Array.h | ||
operator bool() |
Conversion to "bool" returning true if the iterator has not reached the last element. | Containers/Array.h | |
bool operator!=
(
const TIndexedContainerIterator& Rhs |
Containers/Array.h | ||
ElementType & operator*() |
Containers/Array.h | ||
TIndexedContainerIterator operator+
(
SizeType Offset |
Containers/Array.h | ||
TIndexedContainerIterator operator++
(
int |
Containers/Array.h | ||
TIndexedContainerIterator & operator++() |
Advances iterator to the next element in the container. | Containers/Array.h | |
TIndexedContainerIterator & operator+=
(
SizeType Offset |
Iterator arithmetic support | Containers/Array.h | |
TIndexedContainerIterator & operator-=
(
SizeType Offset |
Containers/Array.h | ||
bool operator==
(
const TIndexedContainerIterator& Rhs |
Containers/Array.h | ||
ElementType * operator->() |
Containers/Array.h |