TStructOnScope

Typed [FStructOnScope](API\Runtime\CoreUObject\UObject\FStructOnScope) that exposes type-safe access to the wrapped struct

Windows
MacOS
Linux

Inheritance Hierarchy

FStructOnScope

TStructOnScope

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/UObject/StructOnScope.h

Include

#include "UObject/StructOnScope.h"

Syntax

template<typename T, typename>
class TStructOnScope : public FStructOnScope

Remarks

Typed FStructOnScope that exposes type-safe access to the wrapped struct

The second template argument is there to restrict to type that are actually USTRUCT. It will be replaced to a static_assert with a better compiler error with a "is ustruct" type trait

Constructors

Name Description

Public function

TStructOnScope()

Public function

TStructOnScope

(
    TStructOnScope&& InOther
)

Public function

TStructOnScope

(
    U&& InStruct
)

Destructors

Name Description

Public function Virtual

~TStructOnScope()

Functions

Name Description

Public function Const

const U *...

 

Cast()

Public function

U *

 

Cast()

Public function

U *

 

CastChecked()

Public function Const

const U *...

 

CastChecked()

Public function Const

T *

 

Get()

Public function

void

 

InitializeAs

(
    TArgs&&... InArgs
)

Initialize the TStructOnScope as a struct of type U which needs to derive from T InArgs The arguments to pass to the constructor of type U

Public function

bool

 

InitializeFrom

(
    const FStructOnScope& InOther
)

Initialize the TStructOnScope from a FStructOnScope containing data that derives from T InOther The FStructOnScope to initialize from

Public function

bool

 

InitializeFrom

(
    FStructOnScope&& InOther
)

Initialize the TStructOnScope from a FStructOnScope containing data that derives from T InOther The FStructOnScope to initialize from

Public function

void

 

InitializeFromChecked

(
    const FStructOnScope& InOther
)

Initialize the TStructOnScope from a FStructOnScope containing data that derives from T InOther The FStructOnScope to initialize from (will assert if it contains an invalid type to store for T)

Public function

void

 

InitializeFromChecked

(
    FStructOnScope&& InOther
)

Initialize the TStructOnScope from a FStructOnScope containing data that derives from T InOther The FStructOnScope to initialize from (will assert if it contains an invalid type to store for T)

Operators

Name Description

Public function Const

 

operator bool()

Public function

TStructOnSco...

 

operator=

(
    TStructOnScope&& InOther
)

Public function

TStructOnSco...

 

operator=

(
    U&& InStruct
)

Public function Const

T *

 

operator->()

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss