Navigation
API > API/Runtime > API/Runtime/Chaos
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.
| Name | TFieldArrayView |
| Type | class |
| Header File | /Engine/Source/Runtime/Experimental/Chaos/Public/Field/FieldArrayView.h |
| Include Path | #include "Field/FieldArrayView.h" |
Syntax
template<typename InElementType>
class TFieldArrayView
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TFieldArrayView
(
TArray< ElementType >& InElementArray, |
Constructor. | Field/FieldArrayView.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ElementType | InElementType | Field/FieldArrayView.h | |
| SizeType | int32 | Field/FieldArrayView.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ArrayNum | SizeType | Field/FieldArrayView.h | ||
| ArrayOffset | SizeType | Field/FieldArrayView.h | ||
| ElementArray | TArray< InElementType > & | Field/FieldArrayView.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ElementType * begin() |
DO NOT USE DIRECTLY STL-like iterators to enable range-based for loop support. | Field/FieldArrayView.h | |
void CheckInvariants() |
Checks array invariants: if array size is greater than zero and less than maximum. | Field/FieldArrayView.h | |
ElementType * end() |
Field/FieldArrayView.h | ||
ElementType * GetData() |
Helper function for returning a typed pointer to the first array entry. | Field/FieldArrayView.h | |
bool IsEmpty () |
Returns true if the array view is empty and contains no elements. | Field/FieldArrayView.h | |
bool IsValidIndex
(
SizeType Index |
Tests if index is valid, i.e. more or equal to zero, and less than the number of elements in the array. | Field/FieldArrayView.h | |
SizeType Num() |
Returns number of elements in array. | Field/FieldArrayView.h | |
void RangeCheck
(
SizeType Index |
Checks if index is in array range. | Field/FieldArrayView.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static size_t GetTypeAlignment() |
Helper function returning the alignment of the inner type. | Field/FieldArrayView.h | |
static size_t GetTypeSize() |
Helper function returning the size of the inner type. | Field/FieldArrayView.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ElementType & operator[]
(
SizeType Index |
Array bracket operator. Returns reference to element at give index. | Field/FieldArrayView.h |