Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
TIndexedContainerIterator< ContainerType, ElementType, IndexType > Class Template Reference

#include <TArray.h>

Public Member Functions

 TIndexedContainerIterator (ContainerType &InContainer, IndexType StartIndex=0)
 
TIndexedContainerIteratoroperator++ ()
 
TIndexedContainerIterator operator++ (int)
 
TIndexedContainerIteratoroperator-- ()
 
TIndexedContainerIterator operator-- (int)
 
TIndexedContainerIteratoroperator+= (int32 Offset)
 
TIndexedContainerIterator operator+ (int32 Offset) const
 
TIndexedContainerIteratoroperator-= (int32 Offset)
 
TIndexedContainerIterator operator- (int32 Offset) const
 
ElementType & operator* () const
 
ElementType * operator-> () const
 
FORCEINLINE operator bool () const
 
IndexType GetIndex () const
 
void Reset ()
 
void SetToEnd ()
 
void RemoveCurrent ()
 

Private Attributes

ContainerType & Container
 
IndexType Index
 

Friends

FORCEINLINE friend bool operator== (const TIndexedContainerIterator &Lhs, const TIndexedContainerIterator &Rhs)
 
FORCEINLINE friend bool operator!= (const TIndexedContainerIterator &Lhs, const TIndexedContainerIterator &Rhs)
 

Detailed Description

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

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

  • A type called ElementType representing the contained type.
  • A method IndexType Num() const that returns the number of items in the container.
  • A method bool IsValidIndex(IndexType index) which returns whether a given index is valid in the container.
  • A method T& operator[](IndexType index) which returns a reference to a contained object by index.
  • A method void RemoveAt(IndexType index) which removes the element at index

Definition at line 29 of file TArray.h.

Constructor & Destructor Documentation

◆ TIndexedContainerIterator()

template<typename ContainerType , typename ElementType , typename IndexType >
TIndexedContainerIterator< ContainerType, ElementType, IndexType >::TIndexedContainerIterator ( ContainerType & InContainer,
IndexType StartIndex = 0 )
inline

Definition at line 32 of file TArray.h.

Member Function Documentation

◆ GetIndex()

template<typename ContainerType , typename ElementType , typename IndexType >
IndexType TIndexedContainerIterator< ContainerType, ElementType, IndexType >::GetIndex ( ) const
inline

Returns an index to the current element.

Definition at line 105 of file TArray.h.

◆ operator bool()

template<typename ContainerType , typename ElementType , typename IndexType >
FORCEINLINE TIndexedContainerIterator< ContainerType, ElementType, IndexType >::operator bool ( ) const
inlineexplicit

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

Definition at line 99 of file TArray.h.

◆ operator*()

template<typename ContainerType , typename ElementType , typename IndexType >
ElementType & TIndexedContainerIterator< ContainerType, ElementType, IndexType >::operator* ( ) const
inline

Definition at line 88 of file TArray.h.

◆ operator+()

template<typename ContainerType , typename ElementType , typename IndexType >
TIndexedContainerIterator TIndexedContainerIterator< ContainerType, ElementType, IndexType >::operator+ ( int32 Offset) const
inline

Definition at line 71 of file TArray.h.

◆ operator++() [1/2]

template<typename ContainerType , typename ElementType , typename IndexType >
TIndexedContainerIterator & TIndexedContainerIterator< ContainerType, ElementType, IndexType >::operator++ ( )
inline

Advances iterator to the next element in the container.

Definition at line 39 of file TArray.h.

◆ operator++() [2/2]

template<typename ContainerType , typename ElementType , typename IndexType >
TIndexedContainerIterator TIndexedContainerIterator< ContainerType, ElementType, IndexType >::operator++ ( int )
inline

Definition at line 44 of file TArray.h.

◆ operator+=()

template<typename ContainerType , typename ElementType , typename IndexType >
TIndexedContainerIterator & TIndexedContainerIterator< ContainerType, ElementType, IndexType >::operator+= ( int32 Offset)
inline

iterator arithmetic support

Definition at line 65 of file TArray.h.

◆ operator-()

template<typename ContainerType , typename ElementType , typename IndexType >
TIndexedContainerIterator TIndexedContainerIterator< ContainerType, ElementType, IndexType >::operator- ( int32 Offset) const
inline

Definition at line 82 of file TArray.h.

◆ operator--() [1/2]

template<typename ContainerType , typename ElementType , typename IndexType >
TIndexedContainerIterator & TIndexedContainerIterator< ContainerType, ElementType, IndexType >::operator-- ( )
inline

Moves iterator to the previous element in the container.

Definition at line 52 of file TArray.h.

◆ operator--() [2/2]

template<typename ContainerType , typename ElementType , typename IndexType >
TIndexedContainerIterator TIndexedContainerIterator< ContainerType, ElementType, IndexType >::operator-- ( int )
inline

Definition at line 57 of file TArray.h.

◆ operator-=()

template<typename ContainerType , typename ElementType , typename IndexType >
TIndexedContainerIterator & TIndexedContainerIterator< ContainerType, ElementType, IndexType >::operator-= ( int32 Offset)
inline

Definition at line 77 of file TArray.h.

◆ operator->()

template<typename ContainerType , typename ElementType , typename IndexType >
ElementType * TIndexedContainerIterator< ContainerType, ElementType, IndexType >::operator-> ( ) const
inline

Definition at line 93 of file TArray.h.

◆ RemoveCurrent()

template<typename ContainerType , typename ElementType , typename IndexType >
void TIndexedContainerIterator< ContainerType, ElementType, IndexType >::RemoveCurrent ( )
inline

Removes current element in array. This invalidates the current iterator value and it must be incremented

Definition at line 123 of file TArray.h.

◆ Reset()

template<typename ContainerType , typename ElementType , typename IndexType >
void TIndexedContainerIterator< ContainerType, ElementType, IndexType >::Reset ( )
inline

Resets the iterator to the first element.

Definition at line 111 of file TArray.h.

◆ SetToEnd()

template<typename ContainerType , typename ElementType , typename IndexType >
void TIndexedContainerIterator< ContainerType, ElementType, IndexType >::SetToEnd ( )
inline

Sets iterator to the last element.

Definition at line 117 of file TArray.h.

Friends And Related Symbol Documentation

◆ operator!=

template<typename ContainerType , typename ElementType , typename IndexType >
FORCEINLINE friend bool operator!= ( const TIndexedContainerIterator< ContainerType, ElementType, IndexType > & Lhs,
const TIndexedContainerIterator< ContainerType, ElementType, IndexType > & Rhs )
friend

Definition at line 130 of file TArray.h.

◆ operator==

template<typename ContainerType , typename ElementType , typename IndexType >
FORCEINLINE friend bool operator== ( const TIndexedContainerIterator< ContainerType, ElementType, IndexType > & Lhs,
const TIndexedContainerIterator< ContainerType, ElementType, IndexType > & Rhs )
friend

Definition at line 129 of file TArray.h.

Member Data Documentation

◆ Container

template<typename ContainerType , typename ElementType , typename IndexType >
ContainerType& TIndexedContainerIterator< ContainerType, ElementType, IndexType >::Container
private

Definition at line 134 of file TArray.h.

◆ Index

template<typename ContainerType , typename ElementType , typename IndexType >
IndexType TIndexedContainerIterator< ContainerType, ElementType, IndexType >::Index
private

Definition at line 135 of file TArray.h.


The documentation for this class was generated from the following file: