TArrayAttribute

Proxy object which fields access to an unbounded array attribute container.

Choose your operating system:

Windows

macOS

Linux

References

Module

MeshDescription

Header

/Engine/Source/Runtime/MeshDescription/Public/AttributeArrayContainer.h

Include

#include "AttributeArrayContainer.h"

Syntax

template<typename AttributeType>
class TArrayAttribute

Remarks

Proxy object which fields access to an unbounded array attribute container.

Constructors

Name Description

Public function

TArrayAttribute

(
    TArrayAttribute< typename TRemoveCV...
)

Construct a TArrayAttribute from a TArrayAttribute.

Public function

TArrayAttribute

(
    ArrayType& InArray,
    int32 InIndex
)

Functions

Name Description

Public function

int32

 

Add

(
    const AttributeType& Value
)

Adds the given value to the end of the array attribute, reserving extra space if necessary.

Public function

int32

 

AddUnique

(
    const AttributeType& Value
)

Adds the given value to the end of the array attribute, reserving extra space if necessary.

Public function Const

AttributeTyp...

 

begin()

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

Public function Const

bool

 

Contains

(
    const AttributeType& Value
)

Determines whether the array attribute contains a particular value

Public function Const

bool

 

ContainsByPredicate

(
    Predicate Pred
)

Checks if this array contains element for which the predicate is true.

Public function Const

AttributeTyp...

 

end()

Public function Const

int32

 

Find

(
    const AttributeType& Value
)

Finds the given value in the array attribute and returns its index

Public function Const

AttributeTyp...

 

FindByPredicate

(
    Predicate Pred
)

Finds an element which matches a predicate functor.

Public function Const

AttributeTyp...

 

GetData()

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

Public function Const

int32

 

IndexOfByPredicate

(
    Predicate Pred
)

Finds an item by predicate.

Public function

void

 

Insert

(
    const AttributeType& Value,
    int32 StartIndex
)

Inserts an element into the given index in the array attribute

Public function

void

 

InsertDefaulted

(
    int32 StartIndex,
    int32 Count
)

Inserts a number of default-constructed elements in the array attribute

Public function Const

bool

 

IsEmpty()

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

Public function Const

bool

 

IsValidIndex

(
    int32 ArrayAttributeIndex
)

Tests if index is valid, i.e. than or equal to zero, and less than the number of elements in the array attribute.

Public function Const

AttributeTyp...

 

Last

(
    int32 IndexFromTheEnd
)

Returns n-th last element from the array attribute.

Public function Const

int32

 

Num()

Returns number of elements in the array attribute.

Public function

int32

 

Remove

(
    const AttributeType& Value
)

Public function

int32

 

RemoveAll

(
    Predicate Pred
)

Removes all elements which match the predicate

Public function

void

 

RemoveAt

(
    int32 StartIndex,
    int32 Count
)

Removes a number of elements from the array attribute

Public function

void

 

Reserve

(
    int32 Num
)

Reserves the number of elements in the array attribute.

Public function

void

 

SetNum

(
    int32 Num
)

Sets the number of elements in the array attribute.

Public function

void

 

SetNumUninitialized

(
    int32 Num
)

Sets the number of elements in the array attribute without initializing any new elements.

Public function

void

 

Sort()

Sorts the array assuming < operator is defined for the item type.

Public function

void

 

SortByPredicate

(
    Predicate Pred
)

Sorts the array using the given predicate.

Public function

void

 

StableSort()

Stable sorts the array assuming < operator is defined for the item type.

Public function

void

 

StableSortByPredicate

(
    Predicate Pred
)

Sorts the array using the given predicate.

Public function

TArrayView< ...

 

ToArrayView()

Return a TArrayView representing this array attribute.

Operators

Name Description

Public function

 

operator TArrayView< AttributeType >()

Implicitly coerce an array attribute to a TArrayView.

Public function Const

AttributeTyp...

 

operator[]

(
    int32 ArrayAttributeIndex
)

Array bracket operator. Returns reference to array attribute element at given index.

Typedefs

Name

Description

ArrayType