engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
FScriptArrayHelper类 参考

FScriptArrayHelper: Pseudo dynamic array. 更多...

#include <UnrealType.h>

被 FScriptArrayHelper_InContainer 继承.

Public 成员函数

FORCEINLINE int32 AddUninitializedValue ()
 Add an uninitialized value to the end of the array. 更多...
 
int32 AddUninitializedValues (int32 Count)
 Add uninitialized values to the end of the array. 更多...
 
FORCEINLINE int32 AddValue ()
 Add a blank, constructed values to the end of the array. 更多...
 
int32 AddValues (int32 Count)
 Add blank, constructed values to the end of the array. 更多...
 
void ClearValues (int32 Index, int32 Count=1)
 Clear values in the array. 更多...
 
void CountBytes (FArchive &Ar) const
 Used by memory counting archives to accumulate the size of this array. 更多...
 
void DestroyContainer_Unsafe ()
 Destroys the container object - THERE SHOULD BE NO MORE USE OF THIS HELPER AFTER THIS FUNCTION IS CALLED!
 
void EmptyAndAddUninitializedValues (int32 Count)
 Empty the array, then add uninitialized values to a given size. 更多...
 
void EmptyAndAddValues (int32 Count)
 Empty the array, then add blank, constructed values to a given size. 更多...
 
void EmptyValues (int32 Slack=0)
 Remove all values from the array, calling destructors, etc as appropriate. 更多...
 
bool ExpandForIndex (int32 Index)
 Expand the array, if needed, so that the given index is valid 更多...
 
FORCEINLINE FScriptArrayHelper (const FArrayProperty *InProperty, const void *InArray)
 Constructor, brings together a property and an instance of the property located in memory 更多...
 
FORCEINLINE uint8 * GetRawPtr (int32 Index=0)
 Returns a uint8 pointer to an element in the array 更多...
 
void InsertValues (int32 Index, int32 Count=1)
 Insert blank, constructed values into the array. 更多...
 
FORCEINLINE bool IsValidIndex (int32 Index) const
 Index range check 更多...
 
void MoveAssign (void *InOtherArray)
 Move the allocation from another array and make it our own. 更多...
 
FORCEINLINE int32 Num () const
 Return the number of elements in the array. 更多...
 
void RemoveValues (int32 Index, int32 Count=1)
 Remove values from the array, calling destructors, etc as appropriate. 更多...
 
void Resize (int32 Count)
 Add or remove elements to set the array to a given size. 更多...
 
void SwapValues (int32 A, int32 B)
 Swap two elements in the array, does not call constructors and destructors 更多...
 

静态 Public 成员函数

static FORCEINLINE int32 Num (const void *Target)
 Static version of Num() used when you don't need to bother to construct a FScriptArrayHelper. 更多...
 

详细描述

FScriptArrayHelper: Pseudo dynamic array.

Used to work with array properties in a sensible way.

构造及析构函数说明

◆ FScriptArrayHelper()

FORCEINLINE FScriptArrayHelper::FScriptArrayHelper ( const FArrayProperty *  InProperty,
const void *  InArray 
)
inline

Constructor, brings together a property and an instance of the property located in memory

参数
InPropertythe property associated with this memory
InArraypointer to raw memory that corresponds to this array. This can be NULL, and sometimes is, but in that case almost all operations will crash.

成员函数说明

◆ AddUninitializedValue()

FORCEINLINE int32 FScriptArrayHelper::AddUninitializedValue ( )
inline

Add an uninitialized value to the end of the array.

返回
the index of the newly added item.

◆ AddUninitializedValues()

int32 FScriptArrayHelper::AddUninitializedValues ( int32  Count)
inline

Add uninitialized values to the end of the array.

参数
Countthe number of items to insert.
返回
the index of the first newly added item.

◆ AddValue()

FORCEINLINE int32 FScriptArrayHelper::AddValue ( )
inline

Add a blank, constructed values to the end of the array.

返回
the index of the newly added item.

◆ AddValues()

int32 FScriptArrayHelper::AddValues ( int32  Count)
inline

Add blank, constructed values to the end of the array.

参数
Countthe number of items to insert.
返回
the index of the first newly added item.

◆ ClearValues()

void FScriptArrayHelper::ClearValues ( int32  Index,
int32  Count = 1 
)
inline

Clear values in the array.

The meaning of clear is defined by the property system.

参数
Indexfirst item to clear.
Countnumber of items to clear.

◆ CountBytes()

void FScriptArrayHelper::CountBytes ( FArchive &  Ar) const
inline

Used by memory counting archives to accumulate the size of this array.

参数
Ararchive to accumulate sizes

◆ EmptyAndAddUninitializedValues()

void FScriptArrayHelper::EmptyAndAddUninitializedValues ( int32  Count)
inline

Empty the array, then add uninitialized values to a given size.

参数
Countthe number of items the array will have on completion.

◆ EmptyAndAddValues()

void FScriptArrayHelper::EmptyAndAddValues ( int32  Count)
inline

Empty the array, then add blank, constructed values to a given size.

参数
Countthe number of items the array will have on completion.

◆ EmptyValues()

void FScriptArrayHelper::EmptyValues ( int32  Slack = 0)
inline

Remove all values from the array, calling destructors, etc as appropriate.

参数
Slackused to presize the array for a subsequent add, to avoid reallocation.

◆ ExpandForIndex()

bool FScriptArrayHelper::ExpandForIndex ( int32  Index)
inline

Expand the array, if needed, so that the given index is valid

参数
Indexindex for the item that we want to ensure is valid
返回
true if expansion was necessary NOTE: This is not a count, it is an INDEX, so the final count will be at least Index+1 this matches the usage.

◆ GetRawPtr()

FORCEINLINE uint8 * FScriptArrayHelper::GetRawPtr ( int32  Index = 0)
inline

Returns a uint8 pointer to an element in the array

参数
Indexindex of the item to return a pointer to.
返回
Pointer to this element, or NULL if the array is empty

◆ InsertValues()

void FScriptArrayHelper::InsertValues ( int32  Index,
int32  Count = 1 
)
inline

Insert blank, constructed values into the array.

参数
Indexindex of the first inserted item after completion
Countthe number of items to insert.

◆ IsValidIndex()

FORCEINLINE bool FScriptArrayHelper::IsValidIndex ( int32  Index) const
inline

Index range check

参数
IndexIndex to check
返回
true if accessing this element is legal.

◆ MoveAssign()

void FScriptArrayHelper::MoveAssign ( void *  InOtherArray)
inline

Move the allocation from another array and make it our own.

注解
The arrays MUST be of the same type, and this function will NOT validate that!
参数
InOtherArrayThe array to move the allocation from.

◆ Num() [1/2]

FORCEINLINE int32 FScriptArrayHelper::Num ( ) const
inline

Return the number of elements in the array.

返回
The number of elements in the array.

◆ Num() [2/2]

static FORCEINLINE int32 FScriptArrayHelper::Num ( const void *  Target)
inlinestatic

Static version of Num() used when you don't need to bother to construct a FScriptArrayHelper.

Returns the number of elements in the array.

参数
Targetpointer to the raw memory associated with a FScriptArray
返回
The number of elements in the array.

◆ RemoveValues()

void FScriptArrayHelper::RemoveValues ( int32  Index,
int32  Count = 1 
)
inline

Remove values from the array, calling destructors, etc as appropriate.

参数
Indexfirst item to remove.
Countnumber of items to remove.

◆ Resize()

void FScriptArrayHelper::Resize ( int32  Count)
inline

Add or remove elements to set the array to a given size.

参数
Countthe number of items the array will have on completion.

◆ SwapValues()

void FScriptArrayHelper::SwapValues ( int32  A,
int32  B 
)
inline

Swap two elements in the array, does not call constructors and destructors

参数
Aindex of one item to swap.
Bindex of the other item to swap.

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