TFieldArrayView

[TFieldArrayView](API\Runtime\Chaos\Field\TFieldArrayView) : Templated fixed-size view of another array

Choose your operating system:

Windows

macOS

Linux

References

Module

Chaos

Header

/Engine/Source/Runtime/Experimental/Chaos/Public/Field/FieldArrayView.h

Include

#include "Field/FieldArrayView.h"

Syntax

template<typename InElementType>
class TFieldArrayView

Remarks

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.

Constructors

Name Description

Public function

TFieldArrayView

(
    TArray< ElementType >& InElementAr...,
    const SizeType InArrayOffset,
    const SizeType InArrayNum
)

Constructor.

Functions

Name Description

Public function Const

ElementType ...

 

begin()

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

Public function Const

void

 

CheckInvariants()

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

Public function Const

ElementType ...

 

end()

Public function Const

ElementType ...

 

GetData()

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

Public function Static

constexpr si...

 

GetTypeAlignment()

Helper function returning the alignment of the inner type.

Public function Static

constexpr si...

 

GetTypeSize()

Helper function returning the size of the inner type.

Public function Const

bool

 

IsEmpty()

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

Public function Const

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.

Public function Const

SizeType

 

Num()

Returns number of elements in array.

Public function Const

void

 

RangeCheck

(
    SizeType Index
)

Checks if index is in array range.

Operators

Name Description

Public function Const

ElementType ...

 

operator[]

(
    SizeType Index
)

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

Typedefs

Name

Description

ElementType

SizeType