Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
SharedPointerInternals::FSharedReferencer< Mode > Class Template Reference

#include <SharedPointerInternals.h>

Public Member Functions

FORCEINLINE FSharedReferencer ()
 
 FSharedReferencer (TReferenceControllerBase< Mode > *InReferenceController)
 
FORCEINLINE FSharedReferencer (FSharedReferencer const &InSharedReference)
 
FORCEINLINE FSharedReferencer (FSharedReferencer &&InSharedReference)
 
 FSharedReferencer (FWeakReferencer< Mode > const &InWeakReference)
 
 FSharedReferencer (FWeakReferencer< Mode > &&InWeakReference)
 
FORCEINLINE ~FSharedReferencer ()
 
FSharedReferenceroperator= (FSharedReferencer const &InSharedReference)
 
FSharedReferenceroperator= (FSharedReferencer &&InSharedReference)
 
FORCEINLINE const bool IsValid () const
 
FORCEINLINE const int32 GetSharedReferenceCount () const
 
FORCEINLINE const bool IsUnique () const
 

Private Attributes

TReferenceControllerBase< Mode > * ReferenceController
 

Friends

template<ESPMode OtherMode>
class FWeakReferencer
 

Detailed Description

template<ESPMode Mode>
class SharedPointerInternals::FSharedReferencer< Mode >

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

Definition at line 478 of file SharedPointerInternals.h.

Constructor & Destructor Documentation

◆ FSharedReferencer() [1/6]

template<ESPMode Mode>
FORCEINLINE SharedPointerInternals::FSharedReferencer< Mode >::FSharedReferencer ( )
inline

Constructor for an empty shared referencer object

Definition at line 483 of file SharedPointerInternals.h.

◆ FSharedReferencer() [2/6]

template<ESPMode Mode>
SharedPointerInternals::FSharedReferencer< Mode >::FSharedReferencer ( TReferenceControllerBase< Mode > * InReferenceController)
inlineexplicit

Constructor that counts a single reference to the specified object

Definition at line 488 of file SharedPointerInternals.h.

◆ FSharedReferencer() [3/6]

template<ESPMode Mode>
FORCEINLINE SharedPointerInternals::FSharedReferencer< Mode >::FSharedReferencer ( FSharedReferencer< Mode > const & InSharedReference)
inline

Copy constructor creates a new reference to the existing object

Definition at line 493 of file SharedPointerInternals.h.

◆ FSharedReferencer() [4/6]

template<ESPMode Mode>
FORCEINLINE SharedPointerInternals::FSharedReferencer< Mode >::FSharedReferencer ( FSharedReferencer< Mode > && InSharedReference)
inline

Move constructor creates no new references

Definition at line 505 of file SharedPointerInternals.h.

◆ FSharedReferencer() [5/6]

template<ESPMode Mode>
SharedPointerInternals::FSharedReferencer< Mode >::FSharedReferencer ( FWeakReferencer< Mode > const & InWeakReference)
inline

Creates a shared referencer object from a weak referencer object. This will only result in a valid object reference if the object already has at least one other shared referencer.

Definition at line 513 of file SharedPointerInternals.h.

◆ FSharedReferencer() [6/6]

template<ESPMode Mode>
SharedPointerInternals::FSharedReferencer< Mode >::FSharedReferencer ( FWeakReferencer< Mode > && InWeakReference)
inline

Creates a shared referencer object from a weak referencer object. This will only result in a valid object reference if the object already has at least one other shared referencer.

Definition at line 532 of file SharedPointerInternals.h.

◆ ~FSharedReferencer()

Destructor.

Definition at line 555 of file SharedPointerInternals.h.

Member Function Documentation

◆ GetSharedReferenceCount()

template<ESPMode Mode>
FORCEINLINE const int32 SharedPointerInternals::FSharedReferencer< Mode >::GetSharedReferenceCount ( ) const
inline

Returns the number of shared references to this object (including this reference.)

Returns
Number of shared references to the object (including this reference.)

Definition at line 630 of file SharedPointerInternals.h.

◆ IsUnique()

template<ESPMode Mode>
FORCEINLINE const bool SharedPointerInternals::FSharedReferencer< Mode >::IsUnique ( ) const
inline

Returns true if this is the only shared reference to this object. Note that there may be outstanding weak references left.

Returns
True if there is only one shared reference to the object, and this is it!

Definition at line 641 of file SharedPointerInternals.h.

◆ IsValid()

template<ESPMode Mode>
FORCEINLINE const bool SharedPointerInternals::FSharedReferencer< Mode >::IsValid ( ) const
inline

Tests to see whether or not this shared counter contains a valid reference

Returns
True if reference is valid

Definition at line 620 of file SharedPointerInternals.h.

◆ operator=() [1/2]

template<ESPMode Mode>
FSharedReferencer & SharedPointerInternals::FSharedReferencer< Mode >::operator= ( FSharedReferencer< Mode > && InSharedReference)
inline

Move assignment operator adds no references to the assigned object. If this counter was previously referencing an object, that reference will be released.

Definition at line 594 of file SharedPointerInternals.h.

◆ operator=() [2/2]

template<ESPMode Mode>
FSharedReferencer & SharedPointerInternals::FSharedReferencer< Mode >::operator= ( FSharedReferencer< Mode > const & InSharedReference)
inline

Assignment operator adds a reference to the assigned object. If this counter was previously referencing an object, that reference will be released.

Definition at line 567 of file SharedPointerInternals.h.

Friends And Related Symbol Documentation

◆ FWeakReferencer

template<ESPMode Mode>
template<ESPMode OtherMode>
friend class FWeakReferencer
friend

Definition at line 649 of file SharedPointerInternals.h.

Member Data Documentation

◆ ReferenceController

template<ESPMode Mode>
TReferenceControllerBase<Mode>* SharedPointerInternals::FSharedReferencer< Mode >::ReferenceController
private

Pointer to the reference controller for the object a shared reference/pointer is referencing

Definition at line 654 of file SharedPointerInternals.h.


The documentation for this class was generated from the following file: