FConstStructView

[FConstStructView](API\Plugins\StructUtils\FConstStructView) is "typed" struct pointer, it contains const pointer to struct plus [UScriptStruct](API\Runtime\CoreUObject\UObject\UScriptStruct) pointer.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FConstStructView

FStructView

References

Module

StructUtils

Header

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

Include

#include "StructView.h"

Syntax

struct FConstStructView

Remarks

FConstStructView is "typed" struct pointer, it contains const pointer to struct plus UScriptStruct pointer. FConstStructView does not own the memory and will not free it when out of scope. It should be only used to pass struct pointer in a limited scope, or when the user controls the lifetime of the struct being stored. E.g. instead of passing ref or pointer to a FInstancedStruct, you should use FConstStructView or FStructView to pass around a view to the contents. FConstStructView is passed by value. FConstStructView is similar to FStructOnScope, but FConstStructView is a view only (FStructOnScope can either own the memory or be a view)

Variables

Name Description

Protected variable

const UScriptSt...

 

ScriptStruct

Protected variable

const uint8 ...

 

StructMemory

Constructors

Name Description

Public function

FConstStructView()

Public function

FConstStructView

(
    const FInstancedStruct& InstancedS...
)

Public function

FConstStructView

(
    const FConstSharedStruct& SharedSt...
)

Public function

FConstStructView

(
    const FConstStructView& Other
)

Copy constructors

Public function

FConstStructView

(
    FConstStructView&& Other
)

Public function

FConstStructView

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

Functions

Name Description

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

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

 

IsValid()

Returns True if the struct is valid.

Public function Static

FConstStruct...

 

Make

(
    const T& Struct
)

Creates a new FStructView from the templated struct

Public function

void

 

Reset()

Reset to empty.

Protected function

void

 

ResetStructData()

Protected function

void

 

SetStructData

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

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const OtherType& Other
)

Public function

FConstStruct...

 

operator=

(
    FConstStructView&& Other
)

Public function

FConstStruct...

 

operator=

(
    const FConstStructView& Other
)

Assignment operators

Public function Const

bool

 

operator==

(
    const OtherType& Other
)

Comparison operators.

it does not compare the internal structure itself