![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <SharedPointer.h>
Public Types | |
| using | ElementType = ObjectType |
| using | IntrusiveUnsetOptionalStateType = TSharedPtr |
Static Public Attributes | |
| static constexpr ESPMode | Mode = InMode |
| static constexpr bool | bHasIntrusiveUnsetOptionalState = true |
Friends | |
| template<class OtherType , ESPMode OtherMode> | |
| class | TSharedPtr |
| template<class OtherType , ESPMode OtherMode> | |
| class | TSharedRef |
| template<class OtherType , ESPMode OtherMode> | |
| class | TWeakPtr |
| template<class OtherType , ESPMode OtherMode> | |
| class | TSharedFromThis |
TSharedPtr is a non-intrusive reference-counted authoritative object pointer. This shared pointer will be conditionally thread-safe when the optional Mode template argument is set to ThreadSafe.
| using TSharedPtr< ObjectType, InMode >::ElementType = ObjectType |
| using TSharedPtr< ObjectType, InMode >::IntrusiveUnsetOptionalStateType = TSharedPtr |
|
inline |
Constructs an empty shared pointer
|
inlineexplicit |
Constructs a shared pointer that owns the specified object. Note that passing nullptr here will still create a tracked reference to a nullptr pointer. (Consistent with std::shared_ptr)
| InObject | Object this shared pointer to retain a reference to |
|
inline |
Constructs a shared pointer that owns the specified object. Note that passing nullptr here will still create a tracked reference to a nullptr pointer. (Consistent with std::shared_ptr)
| InObject | Object this shared pointer to retain a reference to |
| InDeleter | Deleter object used to destroy the object when it is no longer referenced. |
|
inline |
Constructs a shared pointer using a proxy reference to a raw pointer. (See MakeShareable())
| InRawPtrProxy | Proxy raw pointer that contains the object that the new shared pointer will reference |
|
inline |
Constructs a shared pointer using a proxy reference to a raw pointer. (See MakeShareable())
| InRawPtrProxy | Proxy raw pointer that contains the object that the new shared pointer will reference |
|
inline |
Constructs a shared pointer using a proxy reference to a raw pointer. (See MakeShareable())
| InRawPtrProxy | Proxy raw pointer that contains the object that the new shared pointer will reference |
|
inline |
Constructs a shared pointer as a shared reference to an existing shared pointer's object. This constructor is needed so that we can implicitly upcast to base classes.
| InSharedPtr | The shared pointer whose object we should create an additional reference to |
|
inline |
|
inline |
|
inline |
Implicitly converts a shared reference to a shared pointer, adding a reference to the object. NOTE: We allow an implicit conversion from TSharedRef to TSharedPtr because it's always a safe conversion.
| InSharedRef | The shared reference that will be converted to a shared pointer |
|
inline |
Special constructor used internally to statically cast one shared pointer type to another. You should never call this constructor directly. Instead, use the StaticCastSharedPtr() function. This constructor creates a shared pointer as a shared reference to an existing shared pointer after statically casting that pointer's object. This constructor is needed for static casts.
| InSharedPtr | The shared pointer whose object we should create an additional reference to |
|
inline |
Special constructor used internally to cast a 'const' shared pointer a 'mutable' pointer. You should never call this constructor directly. Instead, use the ConstCastSharedPtr() function. This constructor creates a shared pointer as a shared reference to an existing shared pointer after const casting that pointer's object. This constructor is needed for const casts.
| InSharedPtr | The shared pointer whose object we should create an additional reference to |
|
inline |
Aliasing constructor used to create a shared pointer which shares its reference count with another shared object, but pointing to a different object, typically a subobject.
| OtherSharedPtr | The shared pointer whose reference count should be shared. |
| InObject | The object pointer to use (instead of the incoming shared pointer's object) |
|
inline |
Aliasing constructor used to create a shared pointer which shares its reference count with another shared object, but pointing to a different object, typically a subobject.
| OtherSharedPtr | The shared pointer whose reference count should be shared. |
| InObject | The object pointer to use (instead of the incoming shared pointer's object) |
|
inline |
Aliasing constructor used to create a shared pointer 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) |
|
inlineexplicit |
|
inline |
Returns the object referenced by this pointer, or nullptr if no object is reference
|
inline |
Returns the number of shared references to this object (including this reference.) IMPORTANT: Not necessarily fast! Should only be used for debugging purposes!
|
inline |
Returns true if this is the only shared reference to this object. Note that there may be outstanding weak references left. IMPORTANT: Not necessarily fast! Should only be used for debugging purposes!
|
inline |
Checks to see if this shared pointer is actually pointing to an object
|
inlineexplicit |
Checks to see if this shared pointer is actually pointing to an object
|
inline |
Dereference operator returns a reference to the object this shared pointer points to
|
inline |
Arrow operator returns a pointer to the object this shared pointer references
|
inline |
Assignment to a nullptr pointer. The object currently referenced by this shared pointer will no longer be referenced and will be deleted if there are no other referencers.
|
inline |
Assignment operator replaces this shared pointer with the specified shared pointer. The object currently referenced by this shared pointer will no longer be referenced and will be deleted if there are no other referencers.
| InRawPtrProxy | Proxy object used to assign the object (see MakeShareable helper function) |
|
inline |
Assignment operator replaces this shared pointer with the specified shared pointer. The object currently referenced by this shared pointer will no longer be referenced and will be deleted if there are no other referencers.
| InRawPtrProxy | Proxy object used to assign the object (see MakeShareable helper function) |
|
inline |
Assignment operator replaces this shared pointer with the specified shared pointer. The object currently referenced by this shared pointer will no longer be referenced and will be deleted if there are no other referencers.
| InRawPtrProxy | Proxy object used to assign the object (see MakeShareable helper function) |
|
inline |
|
inline |
Assignment operator replaces this shared pointer with the specified shared pointer. The object currently referenced by this shared pointer will no longer be referenced and will be deleted if there are no other referencers.
| InSharedPtr | Shared pointer to replace with |
|
inline |
Resets this shared pointer, removing a reference to the object. If there are no other shared references to the object then it will be destroyed.
|
inline |
Converts a shared pointer to a shared reference. The pointer must be valid or an assertion will trigger.
|
inline |
Converts a shared pointer to a shared reference. The pointer must be valid or an assertion will trigger.
|
inline |
Converts a shared pointer to a weak ptr.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
|
friend |
|
friend |
|
staticconstexpr |
|
staticconstexpr |