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

TSoftObjectPtr is templatized wrapper of the generic FSoftObjectPtr, it can be used in UProperties 更多...

#include <SoftObjectPtr.h>

Public 成员函数

FORCEINLINE T * Get () const
 Dereference the soft pointer. 更多...
 
FORCEINLINE FString GetAssetName () const
 Returns assetname string, leaving off the /package/path part
 
FORCEINLINE FString GetLongPackageName () const
 Returns /package/path string, leaving off the asset name
 
FORCEINLINE const FSoftObjectPath & GetUniqueID () const
 Returns the StringObjectPath that is wrapped by this SoftObjectPtr
 
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 IsValid () const
 Test if this points to a live UObject 更多...
 
T * LoadSynchronous () const
 Synchronously load (if necessary) and return the asset object represented by this asset ptr
 
FORCEINLINE operator bool () const
 Dereference soft pointer to see if it points somewhere valid
 
FORCEINLINE T & operator* () const
 Dereference the soft pointer
 
FORCEINLINE T * operator-> () const
 Dereference the soft pointer
 
template<class U , class = decltype(ImplicitConv<T*>((U*)nullptr))>
FORCEINLINE TSoftObjectPtr & operator= (const TWeakObjectPtr< U > &Other)
 Copy from a weak pointer to an object already in memory
 
template<typename U >
FORCEINLINE TSoftObjectPtr & operator= (const U *Object)
 Copy from an object already in memory
 
FORCEINLINE TSoftObjectPtr & operator= (FSoftObjectPath ObjectPath)
 Copy from a soft object path
 
template<class U , class = decltype(ImplicitConv<T*>((U*)nullptr))>
FORCEINLINE TSoftObjectPtr & operator= (TSoftObjectPtr< U > Other)
 Copy from another soft pointer
 
FORCEINLINE TSoftObjectPtr & operator= (TYPE_OF_NULLPTR)
 Assign from a nullptr
 
FORCEINLINE void Reset ()
 Reset the soft pointer back to the null state
 
FORCEINLINE void ResetWeakPtr ()
 Resets the weak ptr only, call this when ObjectId may change
 
FORCEINLINE const FSoftObjectPath & ToSoftObjectPath () const
 Returns the StringObjectPath that is wrapped by this SoftObjectPtr
 
FORCEINLINE FString ToString () const
 Returns string representation of reference, in form /package/path.assetname
 
FORCEINLINE TSoftObjectPtr ()
 Default constructor, will be null
 
template<class U , class = decltype(ImplicitConv<T*>((U*)nullptr))>
FORCEINLINE TSoftObjectPtr (const TSoftObjectPtr< U > &Other)
 Construct from another soft pointer
 
template<typename U >
FORCEINLINE TSoftObjectPtr (const U *Object)
 Construct from an object already in memory
 
FORCEINLINE TSoftObjectPtr (FSoftObjectPath ObjectPath)
 Construct from a soft object path
 
template<class U , class = decltype(ImplicitConv<T*>((U*)nullptr))>
FORCEINLINE TSoftObjectPtr (TSoftObjectPtr< U > &&Other)
 Construct from a moveable soft pointer
 
FORCEINLINE TSoftObjectPtr (TYPE_OF_NULLPTR)
 Construct from a nullptr
 

友元

FORCEINLINE friend uint32 GetTypeHash (const TSoftObjectPtr< T > &Other)
 Hash function
 
FORCEINLINE friend bool operator!= (const TSoftObjectPtr &Lhs, const TSoftObjectPtr &Rhs)
 Compare soft pointers for inequality Caution: Two soft pointers might not be equal to each other, but they both might return nullptr 更多...
 
FORCEINLINE friend bool operator!= (const TSoftObjectPtr &Lhs, TYPE_OF_NULLPTR)
 Compare soft pointers for inequality Caution: Two soft pointers might not be equal to each other, but they both might return nullptr 更多...
 
FORCEINLINE friend bool operator!= (TYPE_OF_NULLPTR, const TSoftObjectPtr &Rhs)
 Compare soft pointers for inequality Caution: Two soft pointers might not be equal to each other, but they both might return nullptr 更多...
 
FORCEINLINE friend bool operator== (const TSoftObjectPtr &Lhs, const TSoftObjectPtr &Rhs)
 Compare soft pointers for equality Caution: Two soft pointers might not be equal to each other, but they both might return nullptr 更多...
 
FORCEINLINE friend bool operator== (const TSoftObjectPtr &Lhs, TYPE_OF_NULLPTR)
 Compare soft pointers for equality Caution: Two soft pointers might not be equal to each other, but they both might return nullptr 更多...
 
FORCEINLINE friend bool operator== (TYPE_OF_NULLPTR, const TSoftObjectPtr &Rhs)
 Compare soft pointers for equality Caution: Two soft pointers might not be equal to each other, but they both might return nullptr 更多...
 

详细描述

template<class T = UObject>
struct TSoftObjectPtr< T >

TSoftObjectPtr is templatized wrapper of the generic FSoftObjectPtr, it can be used in UProperties

成员函数说明

◆ Get()

template<class T = UObject>
FORCEINLINE T * TSoftObjectPtr< T >::Get ( ) const
inline

Dereference the soft pointer.

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

◆ IsNull()

template<class T = UObject>
FORCEINLINE bool TSoftObjectPtr< T >::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 T = UObject>
FORCEINLINE bool TSoftObjectPtr< T >::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

◆ IsValid()

template<class T = UObject>
FORCEINLINE bool TSoftObjectPtr< T >::IsValid ( ) const
inline

Test if this points to a live UObject

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

友元及相关函数文档

◆ operator!= [1/3]

template<class T = UObject>
FORCEINLINE friend bool operator!= ( const TSoftObjectPtr< T > &  Lhs,
const TSoftObjectPtr< T > &  Rhs 
)
friend

Compare soft pointers for inequality Caution: Two soft pointers might not be equal to each other, but they both might return nullptr

参数
Othersoft pointer to compare to

◆ operator!= [2/3]

template<class T = UObject>
FORCEINLINE friend bool operator!= ( const TSoftObjectPtr< T > &  Lhs,
TYPE_OF_NULLPTR   
)
friend

Compare soft pointers for inequality Caution: Two soft pointers might not be equal to each other, but they both might return nullptr

参数
Othersoft pointer to compare to

◆ operator!= [3/3]

template<class T = UObject>
FORCEINLINE friend bool operator!= ( TYPE_OF_NULLPTR  ,
const TSoftObjectPtr< T > &  Rhs 
)
friend

Compare soft pointers for inequality Caution: Two soft pointers might not be equal to each other, but they both might return nullptr

参数
Othersoft pointer to compare to

◆ operator== [1/3]

template<class T = UObject>
FORCEINLINE friend bool operator== ( const TSoftObjectPtr< T > &  Lhs,
const TSoftObjectPtr< T > &  Rhs 
)
friend

Compare soft pointers for equality Caution: Two soft pointers might not be equal to each other, but they both might return nullptr

参数
Othersoft pointer to compare to

◆ operator== [2/3]

template<class T = UObject>
FORCEINLINE friend bool operator== ( const TSoftObjectPtr< T > &  Lhs,
TYPE_OF_NULLPTR   
)
friend

Compare soft pointers for equality Caution: Two soft pointers might not be equal to each other, but they both might return nullptr

参数
Othersoft pointer to compare to

◆ operator== [3/3]

template<class T = UObject>
FORCEINLINE friend bool operator== ( TYPE_OF_NULLPTR  ,
const TSoftObjectPtr< T > &  Rhs 
)
friend

Compare soft pointers for equality Caution: Two soft pointers might not be equal to each other, but they both might return nullptr

参数
Othersoft pointer to compare to

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