![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <SharedStruct.h>
Static Public Member Functions | |
| template<typename T > | |
| static FSharedStruct | Make () |
| template<typename T > | |
| static FSharedStruct | Make (const T &Struct) |
| static FSharedStruct | Make (const UScriptStruct *InScriptStruct, const uint8 *InStructMemory=nullptr) |
| template<typename T , typename... TArgs> | |
| static FSharedStruct | Make (TArgs &&... InArgs) |
Protected Attributes | |
| TSharedPtr< FStructSharedMemory > | StructMemoryPtr |
Friends | |
| struct | FConstSharedStruct |
FSharedStruct works similarly as a TSharedPtr<FInstancedStruct> but avoids the double pointer indirection. (One pointer for the FInstancedStruct and one pointer for the struct memory it is wrapping). Also note that because of its implementation, it is not possible for now to go from a struct reference or struct view back to a shared struct.
This struct type is also convertible to a FStructView / FConstStructView, and like FInstancedStruct, it is the preferable way of passing it as a parameter. If the calling code would like to keep a shared pointer to the struct, you may pass the FSharedStruct as a parameter, but it is recommended to pass it as a "const FSharedStruct&" to limit the unnecessary recounting.
A 'const FSharedStruct' cannot be made to point at another instance of a struct, whilst a vanilla FSharedStruct can. In either case, the shared struct memory /data is mutable.
|
default |
|
inline |
|
default |
Copy constructors
|
default |
| void FSharedStruct::AddStructReferencedObjects | ( | class FReferenceCollector & | Collector | ) | const |
|
inline |
Determines whether Other contains the same values as this
| FSharedStruct::GENERATED_BODY | ( | ) |
|
inline |
Returns reference to the struct, this getter assumes that all data is valid.
|
inline |
Returns a mutable pointer to struct memory.
|
inline |
Returns pointer to the struct, or nullptr if cast is not valid.
|
inline |
Returns struct type.
|
inline |
| bool FSharedStruct::Identical | ( | const FSharedStruct * | Other, |
| uint32 | PortFlags | ||
| ) | const |
For StructOpsTypeTraits
Initializes from a templated struct type. This will create a new instance of the shared struct memory.
Initializes from other related struct types. This will create a new instance of the shared struct memory.
|
inline |
Initializes from a struct type and optional data. This will create a new instance of the shared struct memory.
|
inline |
Initializes from struct type and emplace args. This will create a new instance of the shared struct memory.
|
inline |
Returns True if the struct is valid.
|
inlinestatic |
Creates a new FSharedStruct from a templated struct type. This will create a new instance of the shared struct memory.
|
inlinestatic |
Creates a new FSharedStruct from templated struct instance. This will create a new instance of the shared struct memory.
|
inlinestatic |
Creates a new FSharedStruct from struct type and optional instance memory. This will create a new instance of the shared struct memory.
|
inlinestatic |
Creates a new FSharedStruct from the templated type and forward all arguments to constructor. This will create a new instance of the shared struct memory.
|
default |
Assignment operators
|
default |
Comparison operators. Note: it does not compare the internal structure itself
|
inline |
Reset to empty.
|
friend |
|
protected |