Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
Include |
#include "Templates/SharedPointer.h" |
template<class ObjectType, ESPMode Mode>
class TSharedFromThis
Derive your class from TSharedFromThis to enable access to a TSharedRef directly from an object instance that's already been allocated. Use the optional Mode template argument for thread-safety.
Name | Description | |
---|---|---|
|
TSharedFromThis() |
Hidden stub constructor |
|
TSharedFromThis ( |
Hidden stub copy constructor |
Name | Description | |
---|---|---|
|
~TSharedFromThis() |
Hidden destructor |
Name | Description | ||
---|---|---|---|
|
TSharedRef< ... |
AsShared() |
Provides access to a shared reference to this object. |
|
TSharedRef< ... |
AsShared() |
Provides access to a shared reference to this object (const.) |
|
TWeakPtr< Ob... |
AsWeak() |
Provides a weak reference to this object. |
|
TWeakPtr< Ob... |
AsWeak() |
|
|
DoesSharedInstanceExist() |
Checks whether our referenced instance is valid (ie, whether it's safe to call AsShared). |
|
|
TSharedRef< ... |
SharedThis ( |
Provides access to a shared reference to an object, given the object's 'this' pointer. |
|
TSharedRef< ... |
SharedThis ( |
Provides access to a shared reference to an object, given the object's 'this' pointer. |
|
UpdateWeakReferenceInternal ( |
INTERNAL USE ONLY Do not call this method. |
|
|
UpdateWeakReferenceInternal ( |
INTERNAL USE ONLY Do not call this method. |
Name | Description | ||
---|---|---|---|
|
TSharedFromT... |
operator= ( |
Hidden stub assignment operator |