engine
 
载入中...
搜索中...
未找到
类 | Public 成员函数 | Protected 类型 | Protected 属性 | 所有成员列表
TChunkedArray< InElementType, TargetBytesPerChunk > 模板类 参考

An array that uses multiple allocations to avoid allocation failure due to fragmentation. 更多...

#include <ChunkedArray.h>

类

struct  FChunk
 A chunk of the array's elements. 更多...
 

Public 成员函数

int32 AddElement (const ElementType &Item)
 Adds a new item to the end of the chunked array. 更多...
 
FORCEINLINE bool IsValidIndex (int32 Index) const
 Tests if index is valid, i.e. 更多...
 
FORCEINLINE TChunkedArray & operator+= (const TArray< ElementType > &Other)
 Appends the specified array to this array. 更多...
 
void Reserve (int32 Number)
 Reserves memory such that the array can contain at least Number elements. 更多...
 
 TChunkedArray (int32 InNumElements=0)
 Initialization constructor.
 

Protected 类型

typedef TIndirectArray< FChunk > ChunksType
 The chunks of the array's elements.
 

Protected 属性

int32 NumElements
 The number of elements in the array.
 

详细描述

template<typename InElementType, uint32 TargetBytesPerChunk = 16384>
class TChunkedArray< InElementType, TargetBytesPerChunk >

An array that uses multiple allocations to avoid allocation failure due to fragmentation.

成员函数说明

◆ AddElement()

template<typename InElementType , uint32 TargetBytesPerChunk = 16384>
int32 TChunkedArray< InElementType, TargetBytesPerChunk >::AddElement ( const ElementType &  Item)
inline

Adds a new item to the end of the chunked array.

参数
ItemThe item to add
返回
Index to the new item

◆ IsValidIndex()

template<typename InElementType , uint32 TargetBytesPerChunk = 16384>
FORCEINLINE bool TChunkedArray< InElementType, TargetBytesPerChunk >::IsValidIndex ( int32  Index) const
inline

Tests if index is valid, i.e.

greater than zero and less than number of elements in array.

参数
IndexIndex to test.
返回
True if index is valid. False otherwise.

◆ operator+=()

template<typename InElementType , uint32 TargetBytesPerChunk = 16384>
FORCEINLINE TChunkedArray & TChunkedArray< InElementType, TargetBytesPerChunk >::operator+= ( const TArray< ElementType > &  Other)
inline

Appends the specified array to this array.

Cannot append to self.

参数
OtherThe array to append.

◆ Reserve()

template<typename InElementType , uint32 TargetBytesPerChunk = 16384>
void TChunkedArray< InElementType, TargetBytesPerChunk >::Reserve ( int32  Number)
inline

Reserves memory such that the array can contain at least Number elements.

参数
NumberThe number of elements that the array should be able to contain after allocation.

该类的文档由以下文件生成: