Navigation
API > API/Plugins > API/Plugins/ChaosRigidAssetNodes
Wrapper for an array that implements copy-on-write for the array. If there are N readers but no writers there will be a single copy of the array If a codepath writes to the array and they aren't the only referencer, the array will be duplicated This means each modification will not implicitly duplicate - only if there are multiple referencers otherwise, we modify in place.
| Name | TCopyOnWriteArray |
| Type | class |
| Header File | /Engine/Plugins/Experimental/ChaosRigidAsset/Source/ChaosRigidAssetNodes/Public/CopyOnWriteArray.h |
| Include Path | #include "CopyOnWriteArray.h" |
Syntax
template<typename T>
class TCopyOnWriteArray
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TCopyOnWriteArray
(
const TCopyOnWriteArray& Other |
CopyOnWriteArray.h | ||
| CopyOnWriteArray.h | |||
TCopyOnWriteArray
(
TCopyOnWriteArray&& Other |
CopyOnWriteArray.h |
Structs
| Name | Remarks |
|---|---|
| FState |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Lock | FRWLock | CopyOnWriteArray.h | ||
| State | TRefCountPtr< FState > | CopyOnWriteArray.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 Add
(
T&& Value |
CopyOnWriteArray.h | ||
int32 Add
(
const T& Value |
CopyOnWriteArray.h | ||
void AddReferencedObjects
(
FReferenceCollector& Collector |
Base case for storage types that don't emit references. | CopyOnWriteArray.h | |
void AddReferencedObjects
(
FReferenceCollector& Collector |
If the array contains USTRUCT types, they might reference UObject types and need to emit references. | CopyOnWriteArray.h | |
void AddReferencedObjects
(
FReferenceCollector& Collector |
If the array contains UObjects, we need to emit references to them directly. | CopyOnWriteArray.h | |
void Append
(
const TArray< T >& Other |
CopyOnWriteArray.h | ||
TArray< T >::RangedForConstIteratorType begin() |
CopyOnWriteArray.h | ||
int32 Emplace
(
Args&&... InArgs |
CopyOnWriteArray.h | ||
TArray< T >::RangedForConstIteratorType end() |
CopyOnWriteArray.h | ||
void Modify
(
int32 AtIndex, |
CopyOnWriteArray.h | ||
void Modify
(
int32 AtIndex, |
CopyOnWriteArray.h | ||
TArray< T > ToArray() |
Copy the internal state into a new TArray. | CopyOnWriteArray.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const T & operator[]
(
int32 Index |
CopyOnWriteArray.h | ||
TCopyOnWriteArray & operator=
(
const TCopyOnWriteArray& Other |
CopyOnWriteArray.h | ||
TCopyOnWriteArray & operator=
(
TCopyOnWriteArray&& Other |
CopyOnWriteArray.h |