Ark Server API (ASA) - Wiki
|
Go to the source code of this file.
Classes | |
struct | TEnumerateRef< ElementType, SizeType > |
struct | UE::Core::Private::TEnumerateIter< IteratorType, SizeType > |
struct | TEnumerateRange< RangeType, SizeType > |
Namespaces | |
namespace | UE |
namespace | UE::Core |
namespace | UE::Core::Private |
Typedefs | |
template<typename ElementType , typename SizeType = int32> | |
using | TConstEnumerateRef = TEnumerateRef<const ElementType, SizeType> |
Functions | |
template<typename RangeType > | |
auto | EnumerateRange (RangeType &&Range) -> TEnumerateRange< RangeType, decltype(GetNum(Range))> |
Variables | |
template<typename T , SIZE_T N> | |
TEnumerateRange< T(&) | EnumerateRange [N], int32 >(T(&Range)[N]) |
using TConstEnumerateRef = TEnumerateRef<const ElementType, SizeType> |
Definition at line 45 of file EnumerateRange.h.
auto EnumerateRange | ( | RangeType && | Range | ) | -> TEnumerateRange<RangeType, decltype(GetNum(Range))> |
Allows iterating over a range while also keeping track of the current iteration index.
Usage:
for (TEnumerateRef<T> Elem : EnumerateRange(Container)) { Elem->MemberFunctionOfT(); FunctionTakingT(*Elem); int32 Index = Elem.GetIndex(); }
TEnumerateRef<const T> or TConstEnumerateRef<T> can be used for const iteration.
Iterating over larger containers like TArray64 will require an explicit SizeType parameter: TEnumerateRef<T, int64>
Definition at line 108 of file EnumerateRange.h.