engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 友元 | 所有成员列表
TPersistentObjectPtr< TObjectID > 模板结构体 参考

TPersistentObjectPtr is a template base class for FLazyObjectPtr and FSoftObjectPtr 更多...

#include <PersistentObjectPtr.h>

Public 成员函数

FORCEINLINE UObject * Get () const
 Dereference the pointer, which may cause it to become valid again. 更多...
 
FORCEINLINE UObject * Get (bool bEvenIfPendingKill) const
 Dereference the lazy pointer, which may cause it to become valid again. 更多...
 
FORCEINLINE TObjectID & GetUniqueID ()
 Non-const version of the above
 
FORCEINLINE const TObjectID & GetUniqueID () const
 Gets the unique object identifier associated with this lazy pointer. 更多...
 
FORCEINLINE bool IsNull () const
 Test if this can never point to a live UObject 更多...
 
FORCEINLINE bool IsPending () const
 Test if this does not point to a live UObject, but may in the future 更多...
 
FORCEINLINE bool IsStale () const
 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. 更多...
 
FORCEINLINE bool IsValid () const
 Test if this points to a live UObject 更多...
 
FORCEINLINE class UObject & operator* () const
 Dereference the pointer
 
FORCEINLINE class UObject * operator-> () const
 Dereference the pointer
 
FORCEINLINE void operator= (const class UObject *Object)
 Copy from an object pointer
 
FORCEINLINE void operator= (const FWeakObjectPtr &Other)
 Copy from an existing weak pointer, reserve IDs if required
 
FORCEINLINE void operator= (const TObjectID &InObjectID)
 Copy from a unique object identifier
 
FORCEINLINE void Reset ()
 Reset the lazy pointer back to the null state
 
FORCEINLINE void ResetWeakPtr ()
 Resets the weak ptr only, call this when ObjectId may change
 
FORCEINLINE TPersistentObjectPtr ()
 Default constructor, will be null
 
FORCEINLINE TPersistentObjectPtr (const TObjectID &InObjectID)
 Construct from a unique object identifier
 

友元

FORCEINLINE friend uint32 GetTypeHash (const TPersistentObjectPtr &Ptr)
 Hash function
 
FORCEINLINE friend bool operator!= (const TPersistentObjectPtr &Lhs, const TPersistentObjectPtr &Rhs)
 Compare pointers for inequality. 更多...
 
FORCEINLINE friend bool operator== (const TPersistentObjectPtr &Lhs, const TPersistentObjectPtr &Rhs)
 Compare pointers for equality. 更多...
 
template<typename ReferenceProcessorType , typename CollectorType , typename ArrayPoolType , EFastReferenceCollectorOptions Options>
class TFastReferenceCollector
 

详细描述

template<class TObjectID>
struct TPersistentObjectPtr< TObjectID >

TPersistentObjectPtr is a template base class for FLazyObjectPtr and FSoftObjectPtr

成员函数说明

◆ Get() [1/2]

template<class TObjectID >
FORCEINLINE UObject * TPersistentObjectPtr< TObjectID >::Get ( ) const
inline

Dereference the pointer, which may cause it to become valid again.

Will not try to load pending outside of game thread

返回
nullptr if this object is gone or the pointer was null, otherwise a valid UObject pointer

◆ Get() [2/2]

template<class TObjectID >
FORCEINLINE UObject * TPersistentObjectPtr< TObjectID >::Get ( bool  bEvenIfPendingKill) const
inline

Dereference the lazy pointer, which may cause it to become valid again.

Will not try to load pending outside of game thread

参数
bEvenIfPendingKill,ifthis is true, pendingkill objects are considered valid
返回
nullptr if this object is gone or the lazy pointer was null, otherwise a valid UObject pointer

◆ GetUniqueID()

template<class TObjectID >
FORCEINLINE const TObjectID & TPersistentObjectPtr< TObjectID >::GetUniqueID ( ) const
inline

Gets the unique object identifier associated with this lazy pointer.

Valid even if pointer is not currently valid

返回
Unique ID for this object, or an invalid FUniqueObjectGuid if this pointer isn't set to anything

◆ IsNull()

template<class TObjectID >
FORCEINLINE bool TPersistentObjectPtr< TObjectID >::IsNull ( ) const
inline

Test if this can never point to a live UObject

返回
true if this is explicitly pointing to no object

◆ IsPending()

template<class TObjectID >
FORCEINLINE bool TPersistentObjectPtr< TObjectID >::IsPending ( ) const
inline

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

返回
true if this does not point to a real object, but could possibly

◆ IsStale()

template<class TObjectID >
FORCEINLINE bool TPersistentObjectPtr< TObjectID >::IsStale ( ) const
inline

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.

返回
true if this used to point at a real object but no longer does.

◆ IsValid()

template<class TObjectID >
FORCEINLINE bool TPersistentObjectPtr< TObjectID >::IsValid ( ) const
inline

Test if this points to a live UObject

返回
true if Get() would return a valid non-null pointer

友元及相关函数文档

◆ operator!=

template<class TObjectID >
FORCEINLINE friend bool operator!= ( const TPersistentObjectPtr< TObjectID > &  Lhs,
const TPersistentObjectPtr< TObjectID > &  Rhs 
)
friend

Compare pointers for inequality.

Only Serial Number matters for the base implementation

◆ operator==

template<class TObjectID >
FORCEINLINE friend bool operator== ( const TPersistentObjectPtr< TObjectID > &  Lhs,
const TPersistentObjectPtr< TObjectID > &  Rhs 
)
friend

Compare pointers for equality.

Only Serial Number matters for the base implementation


该结构体的文档由以下文件生成: