TLazyObjectPtr

[TLazyObjectPtr](API\Runtime\CoreUObject\UObject\TLazyObjectPtr) is templatized version of the generic [FLazyObjectPtr](API\Runtime\CoreUObject\UObject\FLazyObjectPtr)

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

CoreUObject

Header

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

Include

#include "UObject/LazyObjectPtr.h"

Syntax

template<class T>
struct TLazyObjectPtr : private FLazyObjectPtr

Remarks

TLazyObjectPtr is templatized version of the generic FLazyObjectPtr

Constructors

Name Description

Public function

TLazyObjectPtr()

Public function

TLazyObjectPtr

(
    TLazyObjectPtr< T >&&
)

Public function

TLazyObjectPtr

(
    const TLazyObjectPtr< T >&
)

Public function

TLazyObjectPtr

(
    const TLazyObjectPtr< U >& Other
)

Construct from another lazy pointer with implicit upcasting allowed

Public function

TLazyObjectPtr

(
    T* Object
)

Construct from an object pointer

Functions

Name Description

Public function Const

T *

 

Get()

Dereference the lazy pointer.

Public function Const

const FUniqueObjectGuid &

 

GetUniqueID()

Gets the unique object identifier associated with this lazy pointer.

Public function Const

bool

 

IsNull()

Test if this can never point to a live UObject

Public function Const

bool

 

IsPending()

Test if this does not point to a live UObject, but may in the future

Public function Const

bool

 

IsStale()

Slightly different than !IsValid(), returns true if this used to point to a UObject, but doesn't any more and has not been assigned or reset in the mean time.

Public function Const

bool

 

IsValid()

Test if this points to a live UObject

Public function

void

 

Reset()

Reset the lazy pointer back to the null state

Operators

Name Description

Public function Const

 

operator bool()

Dereference lazy pointer to see if it points somewhere valid

Public function Const

T &

 

operator*()

Dereference the lazy pointer

Public function

void

 

operator=

(
    const FUniqueObjectGuid& InObjectID
)

Copy from a unique object identifier WARNING: this doesn't check the type of the object is correct, because the object corresponding to this ID may not even be loaded!

Public function

TLazyObjectPtr< T > &

 

operator=

(
    TLazyObjectPtr< T >&&
)

Public function

TLazyObjectPtr< T > &

 

operator=

(
    const TLazyObjectPtr< T >&
)

Public function

TEnableIf< TPointerIsConvertibleFromTo< U, T >::Value, TLazyObjectPtr< T > & >::Type

 

operator=

(
    const TLazyObjectPtr< U >& Other
)

Assign from another lazy pointer with implicit upcasting allowed

Public function

void

 

operator=

(
    T* Object
)

Copy from an object pointer

Public function Const

T *

 

operator->()

Dereference the lazy pointer

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback