TAccessPtr

[TAccessPtr](API\Plugins\MetasoundFrontend\TAccessPtr)

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

MetasoundFrontend

Header

/Engine/Plugins/Runtime/Metasound/Source/MetasoundFrontend/Public/MetasoundAccessPtr.h

Include

#include "MetasoundAccessPtr.h"

Syntax

template<typename Type>
class TAccessPtr

Remarks

TAccessPtr

TAccessPtr is used to determine whether an object has been destructed or not. It is useful when an object cannot be wrapped in a TSharedPtr. A TAccessPtr is functionally similar to a TWeakPtr, but it cannot pin the object. In order to determine whether an object as accessible, the TAccessPtr executes a TFunctions<> which returns object. If a nullptr is returned, then the object is not accessible.

Object pointers held within a TAccessPtr must only be accessed on the thread where the objects gets destructed to avoid having the object destructed while in use.

If the TAccessPtr's underlying object is accessed when the pointer is invalid, a fallback object will be returned.

Variables

Name Description

Protected variable

Type *

 

CachedObjectPtr

Protected variable

TFunction< Type...

 

GetObject

Constructors

Name Description

Public function

TAccessPtr()

Public function

TAccessPtr

(
    const TAccessPtr< Type >& InOther
)

Public function

TAccessPtr

(
    TAccessPtr< Type >&& InOther
)

Protected function

TAccessPtr

(
    TFunction< Type*()> InGetObjec...
)

Public function

TAccessPtr

(
    TWeakPtr< FTokenType > AccessToken,
    Type& InRef
)

Creates a access pointer using an access token.

Public function

TAccessPtr

(
    const TAccessPtr< OtherType >& InO...,
    EConstCast InTag
)

Creates an access pointer from another using a const casts.

Public function

TAccessPtr

(
    const TAccessPtr< OtherType >& InO...,
    EDerivedCopy InTag
)

Creates an access pointer from another using a static cast.

Functions

Name Description

Public function Const

Type *

 

Get()

Returns a pointer to the accessible object. If the object is inaccessible, a nullptr is returned.

Public function Const

AccessPtrTyp...

 

GetMemberAccessPtr

(
    FunctionType InGetMember
)

Returns an access pointer to a member of the wrapped object.

Operators

Name Description

Public function

TAccessPtr< ...

 

operator=

(
    const TAccessPtr< Type >& InOther
)

Public function

TAccessPtr &

 

operator=

(
    TAccessPtr< Type >&& InOther
)

Enums

Name

Description

Private enum

EConstCast

Private enum

EDerivedCopy

Typedefs

Name

Description

FTokenType

ObjectType

Constants

Name

Description

FallbackObject