UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TFieldArrayView< InElementType > Class Template Reference

#include <FieldArrayView.h>

Public Types

using ElementType = InElementType
 
using SizeType = int32
 

Public Member Functions

 TFieldArrayView (TArray< ElementType > &InElementArray, const SizeType InArrayOffset, const SizeType InArrayNum)
 
FORCEINLINE ElementTypeGetData () const
 
FORCEINLINE void CheckInvariants () const
 
FORCEINLINE void RangeCheck (SizeType Index) const
 
FORCEINLINE bool IsValidIndex (SizeType Index) const
 
bool IsEmpty () const
 
FORCEINLINE SizeType Num () const
 
FORCEINLINE ElementTypeoperator[] (SizeType Index) const
 
FORCEINLINE ElementTypebegin () const
 
FORCEINLINE ElementTypeend () const
 

Static Public Member Functions

static FORCEINLINE constexpr size_t GetTypeSize ()
 
static FORCEINLINE constexpr size_t GetTypeAlignment ()
 

Detailed Description

template<typename InElementType>
class TFieldArrayView< InElementType >

TFieldArrayView : Templated fixed-size view of another array

A statically sized view of an TArray of typed elements. The reference TArray could be resized and the TFieldArrayView will still be valid For now only used for the fields. Should be extended if required to be used somewhere else.

Member Typedef Documentation

◆ ElementType

◆ SizeType

template<typename InElementType >
using TFieldArrayView< InElementType >::SizeType = int32

Constructor & Destructor Documentation

◆ TFieldArrayView()

template<typename InElementType >
TFieldArrayView< InElementType >::TFieldArrayView ( TArray< ElementType > &  InElementArray,
const SizeType  InArrayOffset,
const SizeType  InArrayNum 
)
inline

Constructor.

Member Function Documentation

◆ begin()

DO NOT USE DIRECTLY STL-like iterators to enable range-based for loop support.

◆ CheckInvariants()

template<typename InElementType >
FORCEINLINE void TFieldArrayView< InElementType >::CheckInvariants ( ) const
inline

Checks array invariants: if array size is greater than zero and less than maximum.

◆ end()

◆ GetData()

template<typename InElementType >
FORCEINLINE ElementType * TFieldArrayView< InElementType >::GetData ( ) const
inline

Helper function for returning a typed pointer to the first array entry.

Returns
Pointer to first array entry or nullptr if ArrayMax == 0.

◆ GetTypeAlignment()

template<typename InElementType >
static FORCEINLINE constexpr size_t TFieldArrayView< InElementType >::GetTypeAlignment ( )
inlinestaticconstexpr

Helper function returning the alignment of the inner type.

◆ GetTypeSize()

template<typename InElementType >
static FORCEINLINE constexpr size_t TFieldArrayView< InElementType >::GetTypeSize ( )
inlinestaticconstexpr

Helper function returning the size of the inner type.

Returns
Size in bytes of array type.

◆ IsEmpty()

template<typename InElementType >
bool TFieldArrayView< InElementType >::IsEmpty ( ) const
inline

Returns true if the array view is empty and contains no elements.

Returns
True if the array view is empty.
See also
Num

◆ IsValidIndex()

template<typename InElementType >
FORCEINLINE bool TFieldArrayView< InElementType >::IsValidIndex ( SizeType  Index) const
inline

Tests if index is valid, i.e. more or equal to zero, and less than the number of elements in the array.

Parameters
IndexIndex to test.
Returns
True if index is valid. False otherwise.

◆ Num()

Returns number of elements in array.

Returns
Number of elements in array.

◆ operator[]()

template<typename InElementType >
FORCEINLINE ElementType & TFieldArrayView< InElementType >::operator[] ( SizeType  Index) const
inline

Array bracket operator. Returns reference to element at give index.

Returns
Reference to indexed element.

◆ RangeCheck()

template<typename InElementType >
FORCEINLINE void TFieldArrayView< InElementType >::RangeCheck ( SizeType  Index) const
inline

Checks if index is in array range.

Parameters
IndexIndex to check.

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