|
| FORCEINLINE ObjectType & | Get () const |
| | Returns a C++ reference to the object this shared reference is referencing 更多...
|
| |
| FORCEINLINE const int32 | GetSharedReferenceCount () const |
| | Returns the number of shared references to this object (including this reference.) IMPORTANT: Not necessarily fast! Should only be used for debugging purposes! 更多...
|
| |
| FORCEINLINE const bool | IsUnique () const |
| | Returns true if this is the only shared reference to this object. 更多...
|
| |
| FORCEINLINE ObjectType & | operator* () const |
| | Dereference operator returns a reference to the object this shared pointer points to 更多...
|
| |
| FORCEINLINE ObjectType * | operator-> () const |
| | Arrow operator returns a pointer to this shared reference's object 更多...
|
| |
| template<typename OtherType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))> |
| FORCEINLINE TSharedRef & | operator= (SharedPointerInternals::FRawPtrProxy< OtherType > const &InRawPtrProxy) |
| | Assignment operator replaces this shared reference with the specified shared reference. 更多...
|
| |
| FORCEINLINE TSharedRef & | operator= (TSharedRef const &InSharedRef) |
| | Assignment operator replaces this shared reference with the specified shared reference. 更多...
|
| |
| | TSharedRef () |
| | Constructs default shared reference that owns the default object for specified type. 更多...
|
| |
| template<typename OtherType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))> |
| FORCEINLINE | TSharedRef (OtherType *InObject) |
| | Constructs a shared reference that owns the specified object. 更多...
|
| |
| template<typename OtherType , typename DeleterType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))> |
| FORCEINLINE | TSharedRef (OtherType *InObject, DeleterType &&InDeleter) |
| | Constructs a shared reference that owns the specified object. 更多...
|
| |
| template<typename OtherType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))> |
| FORCEINLINE | TSharedRef (SharedPointerInternals::FRawPtrProxy< OtherType > const &InRawPtrProxy) |
| | Constructs a shared reference using a proxy reference to a raw pointer. 更多...
|
| |
| template<typename OtherType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))> |
| FORCEINLINE | TSharedRef (TSharedRef< OtherType, Mode > const &InSharedRef) |
| | Constructs a shared reference as a reference to an existing shared reference's object. 更多...
|
| |
| template<typename OtherType > |
| FORCEINLINE | TSharedRef (TSharedRef< OtherType, Mode > const &InSharedRef, SharedPointerInternals::FConstCastTag) |
| | Special constructor used internally to cast a 'const' shared reference a 'mutable' reference. 更多...
|
| |
| template<typename OtherType > |
| FORCEINLINE | TSharedRef (TSharedRef< OtherType, Mode > const &InSharedRef, SharedPointerInternals::FStaticCastTag) |
| | Special constructor used internally to statically cast one shared reference type to another. 更多...
|
| |
| template<typename OtherType > |
| FORCEINLINE | TSharedRef (TSharedRef< OtherType, Mode > const &OtherSharedRef, ObjectType *InObject) |
| | Aliasing constructor used to create a shared reference which shares its reference count with another shared object, but pointing to a different object, typically a subobject. 更多...
|
| |
template<class ObjectType, ESPMode Mode>
class TSharedRef< ObjectType, Mode >
TSharedRef is a non-nullable, non-intrusive reference-counted authoritative object reference.
This shared reference 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 DeleterType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))>
Constructs a shared reference that owns the specified object.
Must not be nullptr.
- 参数
-
| InObject | Object this shared pointer to retain a reference to |
| InDeleter | Deleter object used to destroy the object when it is no longer referenced. |
template<class ObjectType , ESPMode Mode>
template<typename OtherType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))>
Constructs a shared reference as a reference to an existing shared reference's object.
This constructor is needed so that we can implicitly upcast to base classes.
- 参数
-
| InSharedRef | The shared reference whose object we should create an additional reference to |
template<class ObjectType , ESPMode Mode>
template<typename OtherType >
Special constructor used internally to statically cast one shared reference type to another.
You should never call this constructor directly. Instead, use the StaticCastSharedRef() function. This constructor creates a shared reference as a shared reference to an existing shared reference after statically casting that reference's object. This constructor is needed for static casts.
- 参数
-
| InSharedRef | The shared reference whose object we should create an additional reference to |
template<class ObjectType , ESPMode Mode>
template<typename OtherType >
Special constructor used internally to cast a 'const' shared reference a 'mutable' reference.
You should never call this constructor directly. Instead, use the ConstCastSharedRef() function. This constructor creates a shared reference as a shared reference to an existing shared reference after const casting that reference's object. This constructor is needed for const casts.
- 参数
-
| InSharedRef | The shared reference whose object we should create an additional reference to |
template<class ObjectType , ESPMode Mode>
template<typename OtherType >
Aliasing constructor used to create a shared reference which shares its reference count with another shared object, but pointing to a different object, typically a subobject.
- 参数
-
| OtherSharedRef | The shared reference whose reference count should be shared. |
| InObject | The object pointer to use (instead of the incoming shared pointer's object) |
template<class ObjectType , ESPMode Mode>
template<typename OtherType , typename = decltype(ImplicitConv<ObjectType*>((OtherType*)nullptr))>
Assignment operator replaces this shared reference with the specified shared reference.
The object currently referenced by this shared reference will no longer be referenced and will be deleted if there are no other referencers. Must not be nullptr.
- 参数
-
| InRawPtrProxy | Proxy object used to assign the object (see MakeShareable helper function) |