FStructView

[FStructView](API\Plugins\StructUtils\FStructView) is "typed" struct pointer, it contains 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 FStructView : public FConstStructView

Remarks

FStructView is "typed" struct pointer, it contains pointer to struct plus UScriptStruct pointer. FStructView 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. FStructView is passed by value. FStructView is similar to FStructOnScope, but FStructView is a view only (FStructOnScope can either own the memory or be a view)

Constructors

Name Description

Public function

FStructView()

Public function

FStructView

(
    const FInstancedStruct& InstancedS...
)

Public function

FStructView

(
    const FSharedStruct& SharedStruct
)

Public function

FStructView

(
    const FStructView& Other
)

Copy constructors

Public function

FStructView

(
    FStructView&& Other
)

Public function

FStructView

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

Functions

Name Description

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 Static

FStructView

 

Make

(
    T& InStruct
)

Creates a new FStructView from the templated struct.

Operators

Name Description

Public function

FStructView ...

 

operator=

(
    const FStructView& Other
)

Assignment operators

Public function

FStructView ...

 

operator=

(
    FStructView&& Other
)