Navigation
API > API/Runtime > API/Runtime/CoreUObject
FConstSharedStruct is the same as the FSharedStruct but restricts the API to return a const struct type.
A 'const FConstSharedStruct' cannot be made to point at another instance of a struct, whilst a vanilla FConstSharedStruct can. In either case, the struct data is immutable.
See FSharedStruct for more information.
| Name | FConstSharedStruct |
| Type | struct |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/StructUtils/SharedStruct.h |
| Include Path | #include "StructUtils/SharedStruct.h" |
Syntax
USTRUCT ()
struct FConstSharedStruct
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FConstSharedStruct
(
FSharedStruct&& SharedStruct |
StructUtils/SharedStruct.h | ||
FConstSharedStruct
(
FConstSharedStruct&& Other |
StructUtils/SharedStruct.h | ||
FConstSharedStruct
(
const FConstSharedStruct& Other |
StructUtils/SharedStruct.h | ||
| StructUtils/SharedStruct.h | |||
FConstSharedStruct
(
const FSharedStruct& SharedStruct |
StructUtils/SharedStruct.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddStructReferencedObjects
(
FReferenceCollector& Collector |
StructUtils/SharedStruct.h | ||
bool CompareStructValues
(
const OtherType& Other, |
Determines whether Other contains the same values as `this_ | StructUtils/SharedStruct.h | |
T & Get() |
Returns const reference to the struct, this getter assumes that all data is valid. | StructUtils/SharedStruct.h | |
const uint8 * GetMemory() |
Returns const pointer to struct memory. | StructUtils/SharedStruct.h | |
T * GetPtr() |
Returns const pointer to the struct, or nullptr if cast is not valid. | StructUtils/SharedStruct.h | |
const UScriptStruct * GetScriptStruct() |
Returns struct type. | StructUtils/SharedStruct.h | |
TObjectPtr< const UScriptStruct > * GetScriptStructPtr() |
StructUtils/SharedStruct.h | ||
bool Identical
(
const FConstSharedStruct* Other, |
For StructOpsTypeTraits | StructUtils/SharedStruct.h | |
void InitializeAs
(
const UScriptStruct* InScriptStruct, |
Initializes from a struct type and optional data. | StructUtils/SharedStruct.h | |
void InitializeAs
(
TArgs&&... InArgs |
Initializes from struct type and emplace args. | StructUtils/SharedStruct.h | |
void InitializeAs
(
const T& Struct |
Initializes from other related struct types. | StructUtils/SharedStruct.h | |
void InitializeAs () |
Initializes from a templated struct type. | StructUtils/SharedStruct.h | |
bool IsValid() |
Returns True if the struct is valid. | StructUtils/SharedStruct.h | |
void Reset() |
Reset to empty. | StructUtils/SharedStruct.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FConstSharedStruct Make () |
Creates a new FSharedStruct from a templated struct type. | StructUtils/SharedStruct.h | |
static FConstSharedStruct Make
(
const T& Struct |
Creates a new FSharedStruct from templated struct instance. | StructUtils/SharedStruct.h | |
static FConstSharedStruct Make
(
TArgs&&... InArgs |
Creates a new FSharedStruct from the templated type and forward all arguments to constructor. | StructUtils/SharedStruct.h | |
static FConstSharedStruct Make
(
const UScriptStruct* InScriptStruct, |
Creates a new FSharedStruct from a struct type and optional data. | StructUtils/SharedStruct.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const OtherType& Other |
StructUtils/SharedStruct.h | ||
FConstSharedStruct & operator=
(
const FConstSharedStruct& Other |
StructUtils/SharedStruct.h | ||
FConstSharedStruct & operator=
(
const FSharedStruct& SharedStruct |
StructUtils/SharedStruct.h | ||
FConstSharedStruct & operator=
(
FConstSharedStruct&& Other |
StructUtils/SharedStruct.h | ||
FConstSharedStruct & operator=
(
FSharedStruct&& InSharedStruct |
StructUtils/SharedStruct.h | ||
bool operator==
(
const OtherType& Other |
Comparison operators. Note: it does not compare the internal structure itself | StructUtils/SharedStruct.h |