|
|
FORCEINLINE bool | HasSameObject (const void *InOtherPtr) const |
| | Returns true if the object this weak pointer points to is the same as the specified object pointer.
|
| |
| FORCEINLINE const bool | IsValid () const |
| | Checks to see if this weak pointer actually has a valid reference to an object 更多...
|
| |
| FORCEINLINE TWeakPtr & | operator= (SharedPointerInternals::FNullTag *) |
| | Assignment to a nullptr pointer. 更多...
|
| |
| template<typename OtherType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))> |
| FORCEINLINE TWeakPtr & | operator= (TSharedPtr< OtherType, Mode > const &InSharedPtr) |
| | Assignment operator sets this weak pointer from a shared pointer 更多...
|
| |
| template<typename OtherType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))> |
| FORCEINLINE TWeakPtr & | operator= (TSharedRef< OtherType, Mode > const &InSharedRef) |
| | Assignment operator sets this weak pointer from a shared reference 更多...
|
| |
| FORCEINLINE TWeakPtr & | operator= (TWeakPtr const &InWeakPtr) |
| | Assignment operator adds a weak reference to the object referenced by the specified weak pointer 更多...
|
| |
| template<typename OtherType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))> |
| FORCEINLINE TWeakPtr & | operator= (TWeakPtr< OtherType, Mode > const &InWeakPtr) |
| | Assignment operator adds a weak reference to the object referenced by the specified weak pointer. 更多...
|
| |
| FORCEINLINE TSharedPtr< ObjectType, Mode > | Pin () && |
| | Converts this weak pointer to a shared pointer that you can use to access the object (if it hasn't expired yet.) Remember, if there are no more shared references to the object, the returned shared pointer will not be valid. 更多...
|
| |
| FORCEINLINE TSharedPtr< ObjectType, Mode > | Pin () const & |
| | Converts this weak pointer to a shared pointer that you can use to access the object (if it hasn't expired yet.) Remember, if there are no more shared references to the object, the returned shared pointer will not be valid. 更多...
|
| |
| FORCEINLINE void | Reset () |
| | Resets this weak pointer, removing a weak reference to the object. 更多...
|
| |
|
FORCEINLINE | TWeakPtr (SharedPointerInternals::FNullTag *=nullptr) |
| | Constructs an empty TWeakPtr
|
| |
| template<typename OtherType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))> |
| FORCEINLINE | TWeakPtr (TSharedPtr< OtherType, Mode > const &InSharedPtr) |
| | Constructs a weak pointer from a shared pointer 更多...
|
| |
| template<typename OtherType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))> |
| FORCEINLINE | TWeakPtr (TSharedRef< OtherType, Mode > const &InSharedRef) |
| | Constructs a weak pointer from a shared reference 更多...
|
| |
| template<typename OtherType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))> |
| FORCEINLINE | TWeakPtr (TWeakPtr< OtherType, Mode > const &InWeakPtr) |
| | Constructs a weak pointer from a weak pointer of another type. 更多...
|
| |
template<class ObjectType, ESPMode Mode>
class TWeakPtr< ObjectType, Mode >
TWeakPtr is a non-intrusive reference-counted weak object pointer.
This weak pointer will be conditionally thread-safe when the optional Mode template argument is set to ThreadSafe.
- 示例
- /github/workspace/Engine/Source/Runtime/UMG/Public/Components/Widget.h.
template<class ObjectType , ESPMode Mode>
template<typename OtherType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))>
Constructs a weak pointer from a weak pointer of another type.
This constructor is intended to allow derived-to-base conversions.
- 参数
-
| InWeakPtr | The weak pointer to create a weak pointer from |
template<class ObjectType , ESPMode Mode>
template<typename OtherType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))>
Assignment operator adds a weak reference to the object referenced by the specified weak pointer.
This assignment operator is intended to allow derived-to-base conversions.
- 参数
-
| InWeakPtr | The weak pointer for the object to assign |
template<class ObjectType , ESPMode Mode>
Converts this weak pointer to a shared pointer that you can use to access the object (if it hasn't expired yet.) Remember, if there are no more shared references to the object, the returned shared pointer will not be valid.
You should always check to make sure the returned pointer is valid before trying to dereference the shared pointer!
- 返回
- Shared pointer for this object (will only be valid if still referenced!)
template<class ObjectType , ESPMode Mode>
Converts this weak pointer to a shared pointer that you can use to access the object (if it hasn't expired yet.) Remember, if there are no more shared references to the object, the returned shared pointer will not be valid.
You should always check to make sure the returned pointer is valid before trying to dereference the shared pointer!
- 返回
- Shared pointer for this object (will only be valid if still referenced!)
template<class ObjectType , ESPMode Mode>
| FORCEINLINE void TWeakPtr< ObjectType, Mode >::Reset |
( |
| ) |
|
|
inline |
Resets this weak pointer, removing a weak reference to the object.
If there are no other shared or weak references to the object, then the tracking object will be destroyed.