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

#include <SharedPointerInternals.h>

+ Collaboration diagram for SharedPointerInternals::FSharedReferencer< Mode >:

Public Member Functions

FORCEINLINE FSharedReferencer ()
 
 FSharedReferencer (FReferenceControllerBase *InReferenceController)
 
FORCEINLINE FSharedReferencer (FSharedReferencer const &InSharedReference)
 
FORCEINLINE FSharedReferencer (FSharedReferencer &&InSharedReference)
 
 FSharedReferencer (FWeakReferencer< Mode > const &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 Types

typedef FReferenceControllerOps< Mode > TOps
 

Private Attributes

FReferenceControllerBaseReferenceController
 

Friends

template<int OtherMode>
class FWeakReferencer
 

Detailed Description

template<int 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 386 of file SharedPointerInternals.h.

Member Typedef Documentation

◆ TOps

template<int Mode>
typedef FReferenceControllerOps<Mode> SharedPointerInternals::FSharedReferencer< Mode >::TOps
private

Definition at line 388 of file SharedPointerInternals.h.

Constructor & Destructor Documentation

◆ FSharedReferencer() [1/5]

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

Constructor for an empty shared referencer object

Definition at line 393 of file SharedPointerInternals.h.

◆ FSharedReferencer() [2/5]

template<int Mode>
SharedPointerInternals::FSharedReferencer< Mode >::FSharedReferencer ( FReferenceControllerBase * InReferenceController)
inlineexplicit

Constructor that counts a single reference to the specified object

Definition at line 398 of file SharedPointerInternals.h.

◆ FSharedReferencer() [3/5]

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

Copy constructor creates a new reference to the existing object

Definition at line 403 of file SharedPointerInternals.h.

◆ FSharedReferencer() [4/5]

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

Move constructor creates no new references

Definition at line 415 of file SharedPointerInternals.h.

◆ FSharedReferencer() [5/5]

template<int 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 423 of file SharedPointerInternals.h.

◆ ~FSharedReferencer()

template<int Mode>
FORCEINLINE SharedPointerInternals::FSharedReferencer< Mode >::~FSharedReferencer ( )
inline

Destructor.

Definition at line 441 of file SharedPointerInternals.h.

Member Function Documentation

◆ GetSharedReferenceCount()

template<int 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 516 of file SharedPointerInternals.h.

◆ IsUnique()

template<int 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 527 of file SharedPointerInternals.h.

◆ IsValid()

template<int 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 506 of file SharedPointerInternals.h.

◆ operator=() [1/2]

template<int 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 480 of file SharedPointerInternals.h.

◆ operator=() [2/2]

template<int 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 453 of file SharedPointerInternals.h.

Friends And Related Symbol Documentation

◆ FWeakReferencer

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

Definition at line 535 of file SharedPointerInternals.h.

Member Data Documentation

◆ ReferenceController

template<int Mode>
FReferenceControllerBase* SharedPointerInternals::FSharedReferencer< Mode >::ReferenceController
private

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

Definition at line 540 of file SharedPointerInternals.h.


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