Navigation
API > API/Runtime > API/Runtime/CoreUObject
A generic, transient view of a homogeneously-typed array of instances of a specific UScriptStructFStructArrayView supplies mutable access to the elements of the Array. Note const FStructArrayView only what the view is pointing to can not be modified the actual struct data is still mutable. For a more indepth overview of the constness of views see FConstStructView
| Name | FStructArrayView |
| Type | struct |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/StructUtils/StructArrayView.h |
| Include Path | #include "StructUtils/StructArrayView.h" |
Syntax
struct FStructArrayView
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FStructArrayView
(
const UScriptStruct& InScriptStruct, |
StructUtils/StructArrayView.h | ||
FStructArrayView
(
TArrayView< T > InArrayView |
StructUtils/StructArrayView.h | ||
FStructArrayView
(
TArray< T >& InArray |
StructUtils/StructArrayView.h | ||
| StructUtils/StructArrayView.h | |||
FStructArrayView
(
const UScriptStruct* InScriptStruct, |
StructUtils/StructArrayView.h | ||
FStructArrayView
(
const UScriptStruct* InScriptStruct, |
StructUtils/StructArrayView.h |
Structs
| Name | Remarks |
|---|---|
| FIterator |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ArrayNum | int32 | StructUtils/StructArrayView.h | ||
| DataPtr | void * | StructUtils/StructArrayView.h | ||
| ElementSize | uint32 | StructUtils/StructArrayView.h | ||
| ScriptStruct | const UScriptStruct * | StructUtils/StructArrayView.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FIterator begin() |
Ranged iteration support. DO NOT USE DIRECTLY. | StructUtils/StructArrayView.h | |
void CheckInvariants() |
Checks array invariants: if array size is greater than or equal to zero. | StructUtils/StructArrayView.h | |
FIterator end() |
StructUtils/StructArrayView.h | ||
T & GetAt
(
const int32 Index |
Returns reference to element at given index. Index and template param T must be must be valid. | StructUtils/StructArrayView.h | |
void * GetData() |
Helper function for returning a pointer to the first array element. | StructUtils/StructArrayView.h | |
void * GetDataAt
(
const int32 Index |
Helper function for returning a pointer to an element in the array. | StructUtils/StructArrayView.h | |
const T & GetElementAt
(
const int32 Index |
StructUtils/StructArrayView.h | ||
const T & GetElementAtChecked
(
const int32 Index |
StructUtils/StructArrayView.h | ||
SIZE_T GetElementSize() |
StructUtils/StructArrayView.h | ||
const UScriptStruct & GetElementType() |
StructUtils/StructArrayView.h | ||
const UScriptStruct & GetFragmentType() |
StructUtils/StructArrayView.h | ||
void * GetMutableDataAt
(
const int32 Index |
StructUtils/StructArrayView.h | ||
T & GetMutableElementAt
(
const int32 Index |
StructUtils/StructArrayView.h | ||
T & GetMutableElementAtChecked
(
const int32 Index |
StructUtils/StructArrayView.h | ||
T * GetPtrAt
(
const int32 Index |
Returns pointer to element at given index. | StructUtils/StructArrayView.h | |
const UScriptStruct * GetScriptStruct() |
Returns struct type. | StructUtils/StructArrayView.h | |
uint32 GetTypeSize() |
Helper function returning the size of the inner type. | StructUtils/StructArrayView.h | |
bool IsEmpty () |
Returns true if the array is empty and contains no elements. | StructUtils/StructArrayView.h | |
bool IsValidIndex
(
const int32 Index |
Tests if index is valid, i.e. greater than or equal to zero, and less than the number of elements in the array. | StructUtils/StructArrayView.h | |
T & Last
(
const int32 IndexFromTheEnd |
Returns n-th last element from the array. | StructUtils/StructArrayView.h | |
FStructArrayView Left
(
const int32 Count |
Returns the left-most part of the view by taking the given number of elements from the left. | StructUtils/StructArrayView.h | |
FStructArrayView LeftChop
(
const int32 Count |
Returns the left-most part of the view by chopping the given number of elements from the right. | StructUtils/StructArrayView.h | |
void LeftChopInline
(
const int32 Count |
Modifies the view by chopping the given number of elements from the right. | StructUtils/StructArrayView.h | |
void LeftInline
(
const int32 Count |
Modifies the view to be the given number of elements from the left. | StructUtils/StructArrayView.h | |
FStructArrayView Mid
(
int32 Index, |
Returns the middle part of the view by taking up to the given number of elements from the given position. | StructUtils/StructArrayView.h | |
void MidInline
(
const int32 Position, |
Modifies the view to be the middle part by taking up to the given number of elements from the given position. | StructUtils/StructArrayView.h | |
int32 Num() |
Returns number of elements in array. | StructUtils/StructArrayView.h | |
void RangeCheck
(
int32 Index |
Checks if index is in array range. | StructUtils/StructArrayView.h | |
FStructArrayView Right
(
const int32 Count |
Returns the right-most part of the view by taking the given number of elements from the right. | StructUtils/StructArrayView.h | |
FStructArrayView RightChop
(
const int32 Count |
Returns the right-most part of the view by chopping the given number of elements from the left. | StructUtils/StructArrayView.h | |
void RightChopInline
(
const int32 Count |
Modifies the view by chopping the given number of elements from the left. | StructUtils/StructArrayView.h | |
void RightInline
(
const int32 Count |
Modifies the view to be the given number of elements from the right. | StructUtils/StructArrayView.h | |
FStructArrayView Slice
(
const int32 Index, |
Returns a sliced view This is similar to Mid(), but with a narrow contract, i.e. slicing outside of the range of the view is illegal. | StructUtils/StructArrayView.h | |
void SliceRangeCheck
(
const int32 Index, |
Checks if a slice range [Index, Index+InNum) is in array range. | StructUtils/StructArrayView.h | |
void Swap
(
const int32 Index1, |
Swaps the elements at the specified Indicies. The indicies must be valid! | StructUtils/StructArrayView.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FStructView operator[]
(
const int32 Index |
Array bracket operator. | StructUtils/StructArrayView.h |