Navigation
API > API/Runtime > API/Runtime/Core
FSharedReferencer is a wrapper around a pointer to a reference controller that is used by either a TSharedRef or a TSharedPtr to keep track of a referenced object's lifetime
| Name | FSharedReferencer |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointerInternals.h |
| Include Path | #include "Templates/SharedPointerInternals.h" |
Syntax
template<ESPMode Mode>
class FSharedReferencer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Constructor for an empty shared referencer object | Templates/SharedPointerInternals.h | ||
FSharedReferencer
(
TReferenceControllerBase< Mode >* InReferenceController |
Constructor that counts a single reference to the specified object | Templates/SharedPointerInternals.h | |
FSharedReferencer
(
FSharedReferencer const& InSharedReference |
Copy constructor creates a new reference to the existing object | Templates/SharedPointerInternals.h | |
FSharedReferencer
(
FSharedReferencer&& InSharedReference |
Move constructor creates no new references | Templates/SharedPointerInternals.h | |
FSharedReferencer
(
FWeakReferencer< Mode > const& InWeakReference |
Creates a shared referencer object from a weak referencer object. | Templates/SharedPointerInternals.h | |
FSharedReferencer
(
FWeakReferencer< Mode >&& InWeakReference |
Creates a shared referencer object from a weak referencer object. | Templates/SharedPointerInternals.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FSharedReferencer() |
Destructor. | Templates/SharedPointerInternals.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ReferenceController | TReferenceControllerBase< Mode > * | Pointer to the reference controller for the object a shared reference/pointer is referencing | Templates/SharedPointerInternals.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const int32 GetSharedReferenceCount() |
Returns the number of shared references to this object (including this reference.) | Templates/SharedPointerInternals.h | |
const bool IsUnique () |
Returns true if this is the only shared reference to this object. | Templates/SharedPointerInternals.h | |
const bool IsValid() |
Tests to see whether or not this shared counter contains a valid reference | Templates/SharedPointerInternals.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSharedReferencer & operator=
(
FSharedReferencer const& InSharedReference |
Assignment operator adds a reference to the assigned object. | Templates/SharedPointerInternals.h | |
FSharedReferencer & operator=
(
FSharedReferencer&& InSharedReference |
Move assignment operator adds no references to the assigned object. | Templates/SharedPointerInternals.h |