FInstancedStruct

[FInstancedStruct](API\Plugins\StructUtils\FInstancedStruct) works similarly as instanced UObject* property but is USTRUCTs.

Choose your operating system:

Windows

macOS

Linux

References

Module

StructUtils

Header

/Engine/Plugins/Experimental/StructUtils/Source/StructUtils/Public/InstancedStruct.h

Include

#include "InstancedStruct.h"

Syntax

USTRUCT()
struct FInstancedStruct

Remarks

FInstancedStruct works similarly as instanced UObject* property but is USTRUCTs. Example:

FInstancedStruct Test;

TArray<FInstancedStruct> TestArray;

Variables

Name Description

Protected variable

const UScriptSt...

 

ScriptStruct

Protected variable

const uint8 ...

 

StructMemory

Constructors

Name Description

Public function

FInstancedStruct()

Public function

FInstancedStruct

(
    const UScriptStruct* InScriptS...
)

Public function

FInstancedStruct

(
    const FConstStructView InOther
)

Public function

FInstancedStruct

(
    const FInstancedStruct& InOther
)

Public function

FInstancedStruct

(
    FInstancedStruct&& InOther
)

Protected function

FInstancedStruct

(
    const UScriptStruct* InScriptS...,
    const uint8* InStructMemory
)

Destructors

Name Description

Public function

~FInstancedStruct()

Functions

Name Description

Public function

void

 

AddStructReferencedObjects

(
    FReferenceCollector& Collector
)

Protected function Const

void

 

DestroyScriptStruct()

Public function Const

bool

 

ExportTextItem

(
    FString& ValueStr,
    FInstancedStruct const& DefaultVal...,
    UObject* Parent,
    int32 PortFlags,
    UObject* ExportRootScope
)

Public function Const

const T &

 

Get()

Returns const reference to the struct, this getter assumes that all data is valid.

Public function Const

const uint8 ...

 

GetMemory()

Returns const pointer to struct memory.

Public function Const

T &

 

GetMutable()

Returns mutable reference to the struct, this getter assumes that all data is valid.

Public function Const

uint8 *

 

GetMutableMemory()

Returns a mutable pointer to struct memory.

Public function Const

T *

 

GetMutablePtr()

Returns mutable pointer to the struct, or nullptr if cast is not valid.

Public function Const

const T *...

 

GetPtr()

Returns const pointer to the struct, or nullptr if cast is not valid.

Public function Const

const UScrip...

 

GetScriptStruct()

Returns struct type.

Public function Const

bool

 

Identical

(
    const FInstancedStruct* Other,
    uint32 PortFlags
)

Public function

bool

 

ImportTextItem

(
    const TCHAR*& Buffer,
    int32 PortFlags,
    UObject* Parent,
    FOutputDevice* ErrorText,
    FArchive* InSerializingArchive
)

Public function

void

 

InitializeAs

(
    const UScriptStruct* InScriptS...,
    const uint8* InStructMemory
)

Initializes from struct type and optional data.

Public function

void

 

InitializeAs

(
    TArgs&&... InArgs
)

Initializes from struct type and emplace construct.

Public function Const

bool

 

IsValid()

Returns True if the struct is valid.

Public function Static

FInstancedSt...

 

Make

(
    TArgs&&... InArgs
)

Creates a new FInstancedStruct from the templated type and forward all arguments to constructor.

Public function Static

FInstancedSt...

 

Make

(
    const T& Struct
)

Creates a new FInstancedStruct from templated struct.

Public function Static

FInstancedSt...

 

Make()

Creates a new FInstancedStruct from templated struct type.

Protected function

UScriptStruc...

 

ReinitializeAs

(
    const UScriptStruct* InScriptS...
)

Initializes for new struct type (does nothing if same type) and returns mutable struct.

Public function

void

 

Reset()

Reset to empty.

Protected function

void

 

ResetStructData()

Public function

bool

 

Serialize

(
    FArchive& Ar
)

For StructOpsTypeTraits

Protected function

void

 

SetStructData

(
    const UScriptStruct* InScriptS...,
    const uint8* InStructMemory
)

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const OtherType& Other
)

Public function

FInstancedSt...

 

operator=

(
    const FConstStructView InOther
)

Public function

FInstancedSt...

 

operator=

(
    FInstancedStruct&& InOther
)

Public function

FInstancedSt...

 

operator=

(
    const FInstancedStruct& InOther
)

Public function Const

bool

 

operator==

(
    const OtherType& Other
)

Comparison operators.

it does not compare the internal structure itself