Navigation
API > API/Runtime > API/Runtime/CoreUObject
TConstSharedStruct is a type-safe FConstSharedStruct wrapper against the given BaseStruct type.
When used as a property, this automatically defines the BaseStruct property meta-data. Example:
TConstSharedStruct
TArray
| Name | TConstSharedStruct |
| Type | struct |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/StructUtils/SharedStruct.h |
| Include Path | #include "StructUtils/SharedStruct.h" |
Syntax
template<typename BaseStructT>
struct TConstSharedStruct
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TConstSharedStruct
(
TConstSharedStruct< T >&& Other |
StructUtils/SharedStruct.h | ||
| StructUtils/SharedStruct.h | |||
TConstSharedStruct
(
const TConstSharedStruct< T >& Other |
StructUtils/SharedStruct.h | ||
TConstSharedStruct
(
const TSharedStruct< T >& ConstSharedStruct |
StructUtils/SharedStruct.h | ||
TConstSharedStruct
(
TSharedStruct< T >&& ConstSharedStruct |
StructUtils/SharedStruct.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ConstSharedStruct | FConstSharedStruct | Note: TConstSharedStruct is a wrapper for a FConstSharedStruct (rather than inheriting) so that it can provide a locked-down type-safe API for use in C++, without being able to accidentally take a reference to the untyped API to work around the restrictions. | StructUtils/SharedStruct.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const T & Get () |
Returns const reference to the struct, this getter assumes that all data is valid. | 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 T * GetPtr () |
Returns const pointer to the struct. | StructUtils/SharedStruct.h | |
void Initialize
(
const T& Struct |
Initializes from templated struct instance. | StructUtils/SharedStruct.h | |
void Initialize () |
Initializes from a templated struct type. | StructUtils/SharedStruct.h | |
void Initialize
(
TArgs&&... InArgs |
Initializes from struct type and emplace args. | 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 TConstSharedStruct Make () |
Creates a new TSharedStruct from a templated struct type. | StructUtils/SharedStruct.h | |
static TConstSharedStruct Make
(
const T& Struct |
Creates a new TSharedStruct from templated struct instance. | StructUtils/SharedStruct.h | |
static TConstSharedStruct Make
(
const uint8* InStructMemory |
Creates a new TSharedStruct from a struct type and optional data. | StructUtils/SharedStruct.h | |
static TConstSharedStruct Make
(
TArgs&&... InArgs |
Creates a new TSharedStruct from the templated type and forward all arguments to constructor. | StructUtils/SharedStruct.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const T& Other |
StructUtils/SharedStruct.h | ||
TConstSharedStruct & operator=
(
const TConstSharedStruct< T >& Other |
StructUtils/SharedStruct.h | ||
TConstSharedStruct & operator=
(
const TSharedStruct< T >& SharedStruct |
StructUtils/SharedStruct.h | ||
bool operator==
(
const T& Other |
Comparison operators. Note: it does not compare the internal structure itself | StructUtils/SharedStruct.h |