Navigation
API > API/Runtime > API/Runtime/CoreUObject > API/Runtime/CoreUObject/StructUtils
References
| Module | CoreUObject |
| Header | /Engine/Source/Runtime/CoreUObject/Public/StructUtils/SharedStruct.h |
| Include | #include "StructUtils/SharedStruct.h" |
Syntax
template<typename BaseStructT>
struct TSharedStruct
Remarks
TSharedStruct is a type-safe FSharedStruct wrapper against the given BaseStruct type.
When used as a property, this automatically defines the BaseStruct property meta-data. Example:
TSharedStruct
TArray
Constructors
| Type | Name | Description | |
|---|---|---|---|
TSharedStruct
(
const TSharedStruct< T >& InOther |
Copy constructors | ||
TSharedStruct
(
TSharedStruct< T >&& InOther |
Functions
| Type | Name | Description | |
|---|---|---|---|
| T & | Get () |
Returns reference to the struct, this getter assumes that all data is valid. | |
| uint8 * | GetMemory () |
Returns a mutable pointer to struct memory. | |
| T * | GetPtr () |
Returns pointer to the struct, or nullptr if cast is not valid. | |
| const UScriptStruct * | Returns struct type. | ||
| TObjectPtr< const UScriptStruct > *const | |||
| void | Initialize
(
TArgs&&... InArgs |
Initializes from struct type and emplace args. | |
| void | Initialize
(
const T& Struct |
Initializes from templated struct instance. | |
| void | Initialize () |
Initializes from templated struct type. | |
| bool | IsValid () |
Returns True if the struct is valid. | |
| TSharedStruct | Make () |
Creates a new TSharedStruct. | |
| TSharedStruct | Make
(
const T& Struct |
Creates a new TSharedStruct from templated struct instance. | |
| TSharedStruct | Make
(
TArgs&&... InArgs |
Creates a new TSharedStruct from the templated type and forward all arguments to constructor. | |
| void | Reset () |
Reset to empty. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| bool | operator!=
(
const T& Other |
||
| TSharedStruct & | operator=
(
const TSharedStruct< T >& InOther |
Assignment operators | |
| TSharedStruct & | operator=
(
TSharedStruct< T >&& InOther |
||
| bool | operator==
(
const T& Other |
Comparison operators. Note: it does not compare the internal structure itself |