Navigation
Unreal Engine C++ API Reference > Runtime > CoreUObject > StructUtils
References
Module | CoreUObject |
Header | /Engine/Source/Runtime/CoreUObject/Public/StructUtils/SharedStruct.h |
Include | #include "StructUtils/SharedStruct.h" |
Syntax
struct FStructSharedMemory
Remarks
Holds the information and memory about a UStruct. Instances of these are shared using FConstSharedStruct and FSharedStruct.
The size of the allocation for this struct always includes both the size of the struct and also the size required to hold the structure described by the ScriptStruct. This avoids two pointer referencing (cache misses). Look at Create() to understand more.
A 'const FStructSharedMemory' the memory is immutable. We restrict shallow copies of StructMemory where its not appropriate in the owning types that compose this type. ie:
- FSharedStruct A; ConstSharedStruct B = A; is allowed
- ConstSharedStruct A; FSharedStruct B = A; is not allowed
This type is designed to be used in composition and should not be used outside of the types that compose it.
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
FStructSharedMemory
(
const FStructSharedMemory& Other |
||
![]() |
FStructSharedMemory
(
const FStructSharedMemory&& Other |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
TSharedPtr< FStructSharedMemory > | Create
(
const UScriptStruct& InScriptStruct, |
|
![]() ![]() |
TSharedPtr< FStructSharedMemory > | CreateArgs
(
TArgs&&... InArgs |
|
![]() ![]() |
const uint8 * | GetMemory () |
Returns pointer to aligned struct memory. |
![]() |
uint8 * | Returns mutable pointer to aligned struct memory. | |
![]() ![]() |
const UScriptStruct & | Returns struct type. | |
![]() |
TObjectPtr< const UScriptStruct > & |
Operators
Type | Name | Description | |
---|---|---|---|
![]() |
FStructSharedMemory & | operator=
(
const FStructSharedMemory& Other |
|
![]() |
FStructSharedMemory & | operator=
(
const FStructSharedMemory&& Other |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FStructSharedMemoryDeleter |