Navigation
API > API/Runtime > API/Runtime/CoreUObject > API/Runtime/CoreUObject/StructUtils
References
| Module | CoreUObject |
| Header | /Engine/Source/Runtime/CoreUObject/Public/StructUtils/InstancedStruct.h |
| Include | #include "StructUtils/InstancedStruct.h" |
Syntax
template<typename BaseStructT>
struct TInstancedStruct
Remarks
TInstancedStruct is a type-safe FInstancedStruct wrapper against the given BaseStruct type.
When used as a property, this automatically defines the BaseStruct property meta-data. Example:
TInstancedStruct
TArray
Constructors
| Type | Name | Description | |
|---|---|---|---|
TInstancedStruct
(
const TConstStructView< T > InOther |
This constructor is explicit to avoid accidentally converting struct views to instanced structs (which would result in costly copy of the struct to be made). | ||
TInstancedStruct
(
const TInstancedStruct< T >& InOther |
|||
TInstancedStruct
(
TInstancedStruct< T >&& InOther |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddReferencedObjects
(
FReferenceCollector& Collector |
||
| const T & | Get () |
Returns const reference to the struct, this getter assumes that all data is valid. | |
| const uint8 * | GetMemory () |
Returns const pointer to raw struct memory. | |
| T & | GetMutable () |
Returns mutable reference to the struct, this getter assumes that all data is valid. | |
| uint8 * | Returns a mutable pointer to raw struct memory. | ||
| T * | Returns mutable pointer to the struct, or nullptr if cast is not valid. | ||
| const T * | GetPtr () |
Returns const pointer to the struct, or nullptr if cast is not valid. | |
| const UScriptStruct * | Returns struct type. | ||
| void | InitializeAs
(
TArgs&&... InArgs |
Initializes from struct type and emplace construct. | |
| void | InitializeAsScriptStruct
(
const UScriptStruct* InScriptStruct, |
Initializes from a raw struct type and optional data. | |
| bool | IsValid () |
Returns True if the struct is valid. | |
| TInstancedStruct | Make () |
Creates a new TInstancedStruct from templated struct type. | |
| TInstancedStruct | Make
(
const T& Struct |
Creates a new TInstancedStruct from templated struct. | |
| TInstancedStruct | Make
(
TArgs&&... InArgs |
Creates a new TInstancedStruct from the templated type and forward all arguments to constructor. | |
| void | Reset () |
Reset to empty. | |
| bool |
Operators
| Type | Name | Description | |
|---|---|---|---|
| bool | operator!=
(
const TInstancedStruct< T >& Other |
||
| TInstancedStruct & | operator=
(
TInstancedStruct< T >&& InOther |
||
| TInstancedStruct & | operator=
(
const TInstancedStruct< T >& InOther |
||
| TInstancedStruct & | operator=
(
const TConstStructView< T > InOther |
||
| bool | operator==
(
const TInstancedStruct< T >& Other |
Comparison operators. Deep compares the struct instance when identical. |