Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/TSharedRef
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSharedRef () |
Constructs default shared reference that owns the default object for specified type. | Templates/SharedPointer.h | |
TSharedRef
(
OtherType* InObject |
NOTE: TSharedRef has no default constructor as it does not support empty references. | Templates/SharedPointer.h | |
TSharedRef
(
SharedPointerInternals::TRawPtrProxy< OtherType > const& InRawPtrProxy |
NOTE: The following is an Unreal extension to standard shared_ptr behavior. | Templates/SharedPointer.h | |
TSharedRef
(
SharedPointerInternals::TRawPtrProxyWithDeleter< OtherType, DeleterType > const& InRawPtrProxy |
NOTE: The following is an Unreal extension to standard shared_ptr behavior. | Templates/SharedPointer.h | |
TSharedRef
(
SharedPointerInternals::TRawPtrProxyWithDeleter< OtherType, DeleterType >&& InRawPtrProxy |
NOTE: The following is an Unreal extension to standard shared_ptr behavior. | Templates/SharedPointer.h | |
TSharedRef
(
TSharedRef< OtherType, Mode > const& InSharedRef |
Constructs a shared reference as a reference to an existing shared reference's object. | Templates/SharedPointer.h | |
TSharedRef
(
TSharedRef const& InSharedRef |
Templates/SharedPointer.h | ||
TSharedRef
(
TSharedRef&& InSharedRef |
Templates/SharedPointer.h | ||
| Templates/SharedPointer.h | |||
TSharedRef
(
TSharedPtr< OtherType, Mode > const& InSharedPtr |
Converts a shared pointer to a shared reference. | Templates/SharedPointer.h | |
TSharedRef
(
TSharedPtr< OtherType, Mode >&& InSharedPtr |
Templates/SharedPointer.h | ||
TSharedRef
(
OtherType* InObject, |
Constructs a shared reference that owns the specified object. Must not be nullptr. | Templates/SharedPointer.h | |
TSharedRef
(
TSharedRef< OtherType, Mode > const& InSharedRef, |
Special constructor used internally to statically cast one shared reference type to another. | Templates/SharedPointer.h | |
TSharedRef
(
TSharedRef< OtherType, Mode > const& InSharedRef, |
Special constructor used internally to cast a 'const' shared reference a 'mutable' reference. | Templates/SharedPointer.h | |
TSharedRef
(
TSharedRef< OtherType, Mode > const& OtherSharedRef, |
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. | Templates/SharedPointer.h | |
TSharedRef
(
ObjectType* InObject, |
Templates/SharedPointer.h |
TSharedRef()
Description
Constructs default shared reference that owns the default object for specified type.
Used internally only. Please do not use!
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
TSharedRef()
TSharedRef(OtherType *)
Description
NOTE: TSharedRef has no default constructor as it does not support empty references. You must initialize your TSharedRef to a valid object at construction time. Constructs a shared reference that owns the specified object. Must not be nullptr.
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
template<typename OtherType, std::enable_if_t<(std::is_convertible_v< OtherType *, ObjectType * >), int >>
TSharedRef
(
OtherType * InObject
)
Parameters
| Name | Remarks |
|---|---|
| InObject | Object this shared reference to retain a reference to |
TSharedRef(SharedPointerInternals::TRawPtrProxy< OtherType > const &)
Description
Constructs a shared reference using a proxy reference to a raw pointer. (See MakeShareable()) Must not be nullptr.
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
template<typename OtherType, std::enable_if_t<(std::is_convertible_v< OtherType *, ObjectType * >), int >>
TSharedRef
(
SharedPointerInternals::TRawPtrProxy < OtherType > const & InRawPtrProxy
)
Parameters
| Name | Remarks |
|---|---|
| InRawPtrProxy | Proxy raw pointer that contains the object that the new shared reference will reference |
TSharedRef(SharedPointerInternals::TRawPtrProxyWithDeleter< OtherType, DeleterType > const &)
Description
Constructs a shared reference using a proxy reference to a raw pointer. (See MakeShareable()) Must not be nullptr.
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
template<typename OtherType, typename DeleterType, std::enable_if_t<(std::is_convertible_v< OtherType *, ObjectType * >), int >>
TSharedRef
(
SharedPointerInternals::TRawPtrProxyWithDeleter < OtherType, DeleterType > const & InRawPtrProxy
)
Parameters
| Name | Remarks |
|---|---|
| InRawPtrProxy | Proxy raw pointer that contains the object that the new shared reference will reference |
TSharedRef(SharedPointerInternals::TRawPtrProxyWithDeleter< OtherType, DeleterType > &&)
Description
Constructs a shared reference using a proxy reference to a raw pointer. (See MakeShareable()) Must not be nullptr.
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
template<typename OtherType, typename DeleterType, std::enable_if_t<(std::is_convertible_v< OtherType *, ObjectType * >), int >>
TSharedRef
(
SharedPointerInternals::TRawPtrProxyWithDeleter < OtherType, DeleterType > && InRawPtrProxy
)
Parameters
| Name | Remarks |
|---|---|
| InRawPtrProxy | Proxy raw pointer that contains the object that the new shared reference will reference |
TSharedRef(TSharedRef< OtherType, Mode > const &)
Description
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.
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
template<typename OtherType, std::enable_if_t<(std::is_convertible_v< OtherType *, ObjectType * >), int >>
TSharedRef
(
TSharedRef < OtherType, Mode > const & InSharedRef
)
Parameters
| Name | Remarks |
|---|---|
| InSharedRef | The shared reference whose object we should create an additional reference to |
TSharedRef(TSharedRef const &)
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
TSharedRef
(
TSharedRef const & InSharedRef
)
TSharedRef(TSharedRef &&)
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
TSharedRef
(
TSharedRef && InSharedRef
)
TSharedRef(FIntrusiveUnsetOptionalState)
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
TSharedRef
(
FIntrusiveUnsetOptionalState
)
TSharedRef(TSharedPtr< OtherType, Mode > const &)
Description
Converts a shared pointer to a shared reference. The pointer must be valid or an assertion will trigger. NOTE: This explicit conversion constructor is intentionally private. Use 'ToSharedRef()' instead.
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
template<typename OtherType, std::enable_if_t<(std::is_convertible_v< OtherType *, ObjectType * >), int >>
TSharedRef
(
TSharedPtr < OtherType, Mode > const & InSharedPtr
)
Reference to the object
TSharedRef(TSharedPtr< OtherType, Mode > &&)
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
template<typename OtherType, std::enable_if_t<(std::is_convertible_v< OtherType *, ObjectType * >), int >>
TSharedRef
(
TSharedPtr < OtherType, Mode > && InSharedPtr
)
TSharedRef(OtherType *, DeleterType &&)
Description
Constructs a shared reference that owns the specified object. Must not be nullptr.
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
template<typename OtherType, typename DeleterType, std::enable_if_t<(std::is_convertible_v< OtherType *, ObjectType * >), int >>
TSharedRef
(
OtherType * InObject,
DeleterType && InDeleter
)
Parameters
| Name | Remarks |
|---|---|
| InObject | Object this shared pointer to retain a reference to |
| InDeleter | Deleter object used to destroy the object when it is no longer referenced. |
TSharedRef(TSharedRef< OtherType, Mode > const &, SharedPointerInternals::FStaticCastTag)
Description
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.
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
template<typename OtherType>
TSharedRef
(
TSharedRef < OtherType, Mode > const & InSharedRef,
SharedPointerInternals::FStaticCastTag
)
Parameters
| Name | Remarks |
|---|---|
| InSharedRef | The shared reference whose object we should create an additional reference to |
TSharedRef(TSharedRef< OtherType, Mode > const &, SharedPointerInternals::FConstCastTag)
Description
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.
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
template<typename OtherType>
TSharedRef
(
TSharedRef < OtherType, Mode > const & InSharedRef,
SharedPointerInternals::FConstCastTag
)
Parameters
| Name | Remarks |
|---|---|
| InSharedRef | The shared reference whose object we should create an additional reference to |
TSharedRef(TSharedRef< OtherType, Mode > const &, ObjectType *)
Description
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.
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
template<typename OtherType>
TSharedRef
(
TSharedRef < OtherType, Mode > const & OtherSharedRef,
ObjectType * InObject
)
Parameters
| Name | Remarks |
|---|---|
| OtherSharedRef | The shared reference whose reference count should be shared. |
| InObject | The object pointer to use (instead of the incoming shared pointer's object) |
TSharedRef(ObjectType , SharedPointerInternals::TReferenceControllerBase< Mode > )
| Name | TSharedRef |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h |
| Include Path | #include "Templates/SharedPointer.h" |
TSharedRef
(
ObjectType * InObject,
SharedPointerInternals::TReferenceControllerBase < Mode > * InSharedReferenceCount
)