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

#include <SharedPointerInternals.h>

+ Inheritance diagram for SharedPointerInternals::TReferenceControllerBase< Mode >:

Public Member Functions

FORCEINLINE TReferenceControllerBase ()=default
 
virtual void DestroyObject ()=0
 
virtual ~TReferenceControllerBase ()
 
FORCEINLINE int32 GetSharedReferenceCount () const
 
FORCEINLINE bool IsUnique () const
 
FORCEINLINE void AddSharedReference ()
 
bool ConditionallyAddSharedReference ()
 
FORCEINLINE void ReleaseSharedReference ()
 
FORCEINLINE void AddWeakReference ()
 
void ReleaseWeakReference ()
 
 TReferenceControllerBase (const TReferenceControllerBase &)=delete
 
TReferenceControllerBaseoperator= (const TReferenceControllerBase &)=delete
 

Public Attributes

RefCountType SharedReferenceCount {1}
 
RefCountType WeakReferenceCount {1}
 

Private Types

using RefCountType = std::conditional_t<Mode == ESPMode::ThreadSafe, std::atomic<int32>, int32>
 

Detailed Description

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

Definition at line 43 of file SharedPointerInternals.h.

Member Typedef Documentation

◆ RefCountType

template<ESPMode Mode>
using SharedPointerInternals::TReferenceControllerBase< Mode >::RefCountType = std::conditional_t<Mode == ESPMode::ThreadSafe, std::atomic<int32>, int32>
private

Definition at line 45 of file SharedPointerInternals.h.

Constructor & Destructor Documentation

◆ TReferenceControllerBase() [1/2]

template<ESPMode Mode>
FORCEINLINE SharedPointerInternals::TReferenceControllerBase< Mode >::TReferenceControllerBase ( )
explicitdefault

◆ ~TReferenceControllerBase()

Definition at line 67 of file SharedPointerInternals.h.

◆ TReferenceControllerBase() [2/2]

template<ESPMode Mode>
SharedPointerInternals::TReferenceControllerBase< Mode >::TReferenceControllerBase ( const TReferenceControllerBase< Mode > & )
delete

Member Function Documentation

◆ AddSharedReference()

template<ESPMode Mode>
FORCEINLINE void SharedPointerInternals::TReferenceControllerBase< Mode >::AddSharedReference ( )
inline

Adds a shared reference to this counter

Definition at line 109 of file SharedPointerInternals.h.

◆ AddWeakReference()

template<ESPMode Mode>
FORCEINLINE void SharedPointerInternals::TReferenceControllerBase< Mode >::AddWeakReference ( )
inline

Adds a weak reference to this counter

Definition at line 222 of file SharedPointerInternals.h.

◆ ConditionallyAddSharedReference()

template<ESPMode Mode>
bool SharedPointerInternals::TReferenceControllerBase< Mode >::ConditionallyAddSharedReference ( )
inline

Adds a shared reference to this counter ONLY if there is already at least one reference

Returns
True if the shared reference was added successfully

Definition at line 135 of file SharedPointerInternals.h.

◆ DestroyObject()

◆ GetSharedReferenceCount()

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

Returns the shared reference count

Definition at line 72 of file SharedPointerInternals.h.

◆ IsUnique()

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

Checks if there is exactly one reference left to the object.

Definition at line 91 of file SharedPointerInternals.h.

◆ operator=()

◆ ReleaseSharedReference()

template<ESPMode Mode>
FORCEINLINE void SharedPointerInternals::TReferenceControllerBase< Mode >::ReleaseSharedReference ( )
inline

Releases a shared reference to this counter

Definition at line 185 of file SharedPointerInternals.h.

◆ ReleaseWeakReference()

template<ESPMode Mode>
void SharedPointerInternals::TReferenceControllerBase< Mode >::ReleaseWeakReference ( )
inline

Releases a weak reference to this counter

Definition at line 243 of file SharedPointerInternals.h.

Member Data Documentation

◆ SharedReferenceCount

template<ESPMode Mode>
RefCountType SharedPointerInternals::TReferenceControllerBase< Mode >::SharedReferenceCount {1}

Definition at line 55 of file SharedPointerInternals.h.

◆ WeakReferenceCount

template<ESPMode Mode>
RefCountType SharedPointerInternals::TReferenceControllerBase< Mode >::WeakReferenceCount {1}

Definition at line 62 of file SharedPointerInternals.h.


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