#include <StructArrayView.h>
A generic, transient view of a homogeneously-typed array of instances of a specific UScriptStruct FConstStructArrayView supplies immutable access to the elements of the Array. For a more indepth overview of the constness of views see FConstStructView
◆ FConstStructArrayView() [1/6]
| FConstStructArrayView::FConstStructArrayView |
( |
| ) |
|
|
default |
◆ FConstStructArrayView() [2/6]
| FConstStructArrayView::FConstStructArrayView |
( |
TArray< T > & |
InArray | ) |
|
|
inlineexplicit |
◆ FConstStructArrayView() [3/6]
| FConstStructArrayView::FConstStructArrayView |
( |
TArrayView< T > |
InArrayView | ) |
|
|
inlineexplicit |
◆ FConstStructArrayView() [4/6]
◆ FConstStructArrayView() [5/6]
| FConstStructArrayView::FConstStructArrayView |
( |
const UScriptStruct * |
InScriptStruct, |
|
|
const void * |
InData, |
|
|
const uint32 |
InElementSize, |
|
|
const int32 |
InCount |
|
) |
| |
|
inline |
◆ FConstStructArrayView() [6/6]
| FConstStructArrayView::FConstStructArrayView |
( |
const UScriptStruct & |
InScriptStruct, |
|
|
const void * |
InData, |
|
|
const int32 |
InCount |
|
) |
| |
|
inline |
◆ begin()
Ranged iteration support. DO NOT USE DIRECTLY.
◆ CheckInvariants()
| void FConstStructArrayView::CheckInvariants |
( |
| ) |
const |
|
inline |
Checks array invariants: if array size is greater than or equal to zero.
◆ end()
◆ GetAt()
template<
typename T >
requires (std::is_const_v<T>)
Returns reference to element at given index. Index and template param T MUST be must be valid.
- Parameters
-
| Index | Index of element |
| T | Type of stuct, this must either be the type or a parent type of the struct type in the array. |
- Returns
- const reference to indexed element.
◆ GetData()
| const void * FConstStructArrayView::GetData |
( |
| ) |
const |
|
inline |
Helper function for returning a pointer to the first array entry.
- Returns
- const Pointer to first array entry.
◆ GetDataAt()
| const void * FConstStructArrayView::GetDataAt |
( |
const int32 |
Index | ) |
const |
|
inline |
Helper function for returning a pointer to an element in the array.
- Parameters
-
| Index | Index of element, this MUST be a valid element. |
- Returns
- const Pointer to entry.
◆ GetPtrAt()
template<
typename T >
requires (std::is_const_v<T>)
| constexpr T * FConstStructArrayView::GetPtrAt |
( |
const int32 |
Index | ) |
const |
|
inlineconstexpr |
Returns pointer to element at given index. The index MUST be valid. If parametre T is invalid then nullptr will be returned.
- Parameters
-
| Index | Index of element |
| T | Type of stuct, this must either be the type or a parent type of the struct type in the array. |
- Returns
- const pointer to indexed element.
◆ GetScriptStruct()
| const UScriptStruct * FConstStructArrayView::GetScriptStruct |
( |
| ) |
const |
|
inline |
◆ GetTypeSize()
Helper function returning the size of the inner type.
- Returns
- Size in bytes of array type.
◆ IsEmpty()
| bool FConstStructArrayView::IsEmpty |
( |
| ) |
const |
|
inline |
Returns true if the array is empty and contains no elements.
- Returns
- True if array is empty.
- See also
- Num
◆ IsValidIndex()
| bool FConstStructArrayView::IsValidIndex |
( |
int32 |
Index | ) |
const |
|
inline |
Tests if index is valid, i.e. greater than or equal to zero, and less than the number of elements in the array.
- Parameters
-
- Returns
- True if index is valid. False otherwise.
◆ Last()
template<
typename T >
requires (std::is_const_v<T>)
| constexpr T & FConstStructArrayView::Last |
( |
int32 |
IndexFromTheEnd = 0 | ) |
const |
|
inlineconstexpr |
Returns n-th last element from the array.
- Parameters
-
| IndexFromTheEnd | (Optional) Index from the end of array. This MUST index a valid element. Default is 0. |
- Returns
- const reference to n-th last element from the array.
◆ Left()
Returns the left-most part of the view by taking the given number of elements from the left.
◆ LeftChop()
Returns the left-most part of the view by chopping the given number of elements from the right.
◆ LeftChopInline()
| void FConstStructArrayView::LeftChopInline |
( |
const int32 |
Count | ) |
|
|
inline |
Modifies the view by chopping the given number of elements from the right.
◆ LeftInline()
| void FConstStructArrayView::LeftInline |
( |
const int32 |
Count | ) |
|
|
inline |
Modifies the view to be the given number of elements from the left.
◆ Mid()
Returns the middle part of the view by taking up to the given number of elements from the given position.
◆ MidInline()
Modifies the view to be the middle part by taking up to the given number of elements from the given position.
◆ Num()
| int32 FConstStructArrayView::Num |
( |
| ) |
const |
|
inline |
Returns number of elements in array.
- Returns
- Number of elements in array.
◆ operator=()
◆ operator[]()
◆ RangeCheck()
| void FConstStructArrayView::RangeCheck |
( |
int32 |
Index | ) |
const |
|
inline |
Checks if index is in array range.
- Parameters
-
◆ Right()
Returns the right-most part of the view by taking the given number of elements from the right.
◆ RightChop()
Returns the right-most part of the view by chopping the given number of elements from the left.
◆ RightChopInline()
| void FConstStructArrayView::RightChopInline |
( |
const int32 |
Count | ) |
|
|
inline |
Modifies the view by chopping the given number of elements from the left.
◆ RightInline()
| void FConstStructArrayView::RightInline |
( |
const int32 |
Count | ) |
|
|
inline |
Modifies the view to be the given number of elements from the right.
◆ Slice()
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.
- Parameters
-
| Index | starting index of the new view |
| InNum | number of elements in the new view |
- Returns
- Sliced view
- See also
- Mid
◆ SliceRangeCheck()
| void FConstStructArrayView::SliceRangeCheck |
( |
int32 |
Index, |
|
|
int32 |
InNum |
|
) |
| const |
|
inline |
Checks if a slice range [Index, Index+InNum) is in array range. Length is 0 is allowed on empty arrays; Index must be 0 in that case.
- Parameters
-
| Index | Starting index of the slice. |
| InNum | Length of the slice. |
The documentation for this struct was generated from the following file: