UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TArrayBuilder< ElementType, Allocator > Class Template Reference

#include <ArrayBuilder.h>

Public Member Functions

 TArrayBuilder ()
 
template<typename OtherAllocator >
 TArrayBuilder (const TArray< ElementType, OtherAllocator > &InArray)
 
TArrayBuilderAdd (const ElementType &Item)
 
TArrayBuilderAddUnique (const ElementType &Item)
 
template<typename OtherAllocator >
TArrayBuilderAppend (const TArray< ElementType, OtherAllocator > &OtherArray)
 
TArray< ElementType, AllocatorBuild ()
 
 operator TArray< ElementType, Allocator > ()
 

Detailed Description

template<typename ElementType, typename Allocator = FDefaultAllocator>
class TArrayBuilder< ElementType, Allocator >

Template for fluent array builders.

Parameters
ElementTypeThe type of elements stored in the array.
AllocatorThe allocator to use for elements.

Constructor & Destructor Documentation

◆ TArrayBuilder() [1/2]

template<typename ElementType , typename Allocator = FDefaultAllocator>
TArrayBuilder< ElementType, Allocator >::TArrayBuilder ( )
inline

Default constructor.

◆ TArrayBuilder() [2/2]

template<typename ElementType , typename Allocator = FDefaultAllocator>
TArrayBuilder< ElementType, Allocator >::TArrayBuilder ( const TArray< ElementType, OtherAllocator > &  InArray)
inline

Creates and initializes an array builder from an array of items.

Parameters
InArrayThe array of items to copy.

Member Function Documentation

◆ Add()

template<typename ElementType , typename Allocator = FDefaultAllocator>
TArrayBuilder & TArrayBuilder< ElementType, Allocator >::Add ( const ElementType &  Item)
inline

Adds an item.

Parameters
ItemThe item to add.
Returns
This instance (for method chaining).
See also
AddUnique

◆ AddUnique()

template<typename ElementType , typename Allocator = FDefaultAllocator>
TArrayBuilder & TArrayBuilder< ElementType, Allocator >::AddUnique ( const ElementType &  Item)
inline

Adds an unique item.

Parameters
ItemThe unique item to add.
Returns
This instance (for method chaining).
See also
Add

◆ Append()

template<typename ElementType , typename Allocator = FDefaultAllocator>
TArrayBuilder & TArrayBuilder< ElementType, Allocator >::Append ( const TArray< ElementType, OtherAllocator > &  OtherArray)
inline

Appends an array of items.

Parameters
OtherArrayThe array to append.
Returns
This instance (for method chaining).

◆ Build()

template<typename ElementType , typename Allocator = FDefaultAllocator>
TArray< ElementType, Allocator > TArrayBuilder< ElementType, Allocator >::Build ( )
inline

Builds the array as configured.

Returns
A new array.

◆ operator TArray< ElementType, Allocator >()

template<typename ElementType , typename Allocator = FDefaultAllocator>
TArrayBuilder< ElementType, Allocator >::operator TArray< ElementType, Allocator > ( )
inline

Implicit conversion operator to build the array as configured.

Returns
A new array.

The documentation for this class was generated from the following file: