Navigation
API > API/Runtime > API/Runtime/CoreUObject > API/Runtime/CoreUObject/StructUtils
References
| Module | CoreUObject |
| Header | /Engine/Source/Runtime/CoreUObject/Public/StructUtils/StructArrayView.h |
| Include | #include "StructUtils/StructArrayView.h" |
Syntax
struct FStructArrayView
Remarks
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
Constructors
| Type | Name | Description | |
|---|---|---|---|
FStructArrayView
(
TArray< T >& InArray |
|||
FStructArrayView
(
TArrayView< T > InArrayView |
|||
FStructArrayView
(
const UScriptStruct& InScriptStruct, |
|||
FStructArrayView
(
const UScriptStruct* InScriptStruct, |
|||
FStructArrayView
(
const UScriptStruct* InScriptStruct, |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FIterator | begin () |
Ranged iteration support. DO NOT USE DIRECTLY. | |
| void | Checks array invariants: if array size is greater than or equal to zero. | ||
| FIterator | end () |
||
| T & | Returns reference to element at given index. Index and template param T must be must be valid. | ||
| void * | GetData () |
Helper function for returning a pointer to the first array element. | |
| void * | Helper function for returning a pointer to an element in the array. | ||
| const T & | GetElementAt
(
const int32 Index |
||
| const T & | GetElementAtChecked
(
const int32 Index |
||
| SIZE_T | |||
| const UScriptStruct & | |||
| const UScriptStruct & | |||
| void * | GetMutableDataAt
(
const int32 Index |
||
| T & | GetMutableElementAt
(
const int32 Index |
||
| T & | GetMutableElementAtChecked
(
const int32 Index |
||
| T * | Returns pointer to element at given index. | ||
| const UScriptStruct * | Returns struct type. | ||
| FORCEINLINE_DEBUGGABLEuint32 | GetTypeSize () |
Helper function returning the size of the inner type. | |
| bool | IsEmpty () |
Returns true if the array is empty and contains no elements. | |
| 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. | |
| T & | Returns n-th last element from the array. | ||
| FStructArrayView | Returns the left-most part of the view by taking the given number of elements from the left. | ||
| FStructArrayView | Returns the left-most part of the view by chopping the given number of elements from the right. | ||
| void | LeftChopInline
(
const int32 Count |
Modifies the view by chopping the given number of elements from the right. | |
| void | LeftInline
(
const int32 Count |
Modifies the view to be the given number of elements from the left. | |
| FStructArrayView | Returns the middle part of the view by taking up to the given number of elements from the given position. | ||
| void | Modifies the view to be the middle part by taking up to the given number of elements from the given position. | ||
| int32 | Num () |
Returns number of elements in array. | |
| void | RangeCheck
(
int32 Index |
Checks if index is in array range. | |
| FStructArrayView | Returns the right-most part of the view by taking the given number of elements from the right. | ||
| FStructArrayView | Returns the right-most part of the view by chopping the given number of elements from the left. | ||
| void | RightChopInline
(
const int32 Count |
Modifies the view by chopping the given number of elements from the left. | |
| void | RightInline
(
const int32 Count |
Modifies the view to be the given number of elements from the right. | |
| FStructArrayView | 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. | ||
| void | SliceRangeCheck
(
const int32 Index, |
Checks if a slice range [Index, Index+InNum) is in array range. | |
| void | Swaps the elements at the specified Indicies. The indicies must be valid! |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FStructView | operator[]
(
const int32 Index |
Array bracket operator. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FIterator |