Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
SharedPointerInternals.h File Reference
+ Include dependency graph for SharedPointerInternals.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SharedPointerInternals::FStaticCastTag
 
struct  SharedPointerInternals::FConstCastTag
 
struct  SharedPointerInternals::FNullTag
 
class  SharedPointerInternals::FReferenceControllerBase
 
class  SharedPointerInternals::TReferenceControllerWithDeleter< ObjectType, DeleterType >
 
class  SharedPointerInternals::TIntrusiveReferenceController< ObjectType >
 
struct  SharedPointerInternals::DefaultDeleter< Type >
 
struct  SharedPointerInternals::FRawPtrProxy< ObjectType >
 
struct  SharedPointerInternals::FReferenceControllerOps< ESPMode::ThreadSafe >
 
struct  SharedPointerInternals::FReferenceControllerOps< ESPMode::NotThreadSafe >
 
class  SharedPointerInternals::FSharedReferencer< Mode >
 
class  SharedPointerInternals::FWeakReferencer< Mode >
 

Namespaces

namespace  SharedPointerInternals
 

Macros

#define FORCE_THREADSAFE_SHAREDPTRS   PLATFORM_WEAKLY_CONSISTENT_MEMORY
 
#define THREAD_SANITISE_UNSAFEPTR   0
 
#define TSAN_SAFE
 
#define TSAN_SAFE_UNSAFEPTR   TSAN_SAFE
 

Enumerations

enum  ESPMode { NotThreadSafe = 0 , Fast = 0 , ThreadSafe = 1 }
 

Functions

template<typename ObjectType >
FReferenceControllerBaseSharedPointerInternals::NewDefaultReferenceController (ObjectType *Object)
 
template<typename ObjectType , typename DeleterType >
FReferenceControllerBaseSharedPointerInternals::NewCustomReferenceController (ObjectType *Object, DeleterType &&Deleter)
 
template<typename ObjectType , typename... ArgTypes>
TIntrusiveReferenceController< ObjectType > * SharedPointerInternals::NewIntrusiveReferenceController (ArgTypes &&... Args)
 
template<class SharedPtrType , class ObjectType , class OtherType , int Mode>
FORCEINLINE void SharedPointerInternals::EnableSharedFromThis (TSharedPtr< SharedPtrType, Mode > const *InSharedPtr, ObjectType const *InObject, TSharedFromThis< OtherType, Mode > const *InShareable)
 
template<class SharedPtrType , class ObjectType , class OtherType , int Mode>
FORCEINLINE void SharedPointerInternals::EnableSharedFromThis (TSharedPtr< SharedPtrType, Mode > *InSharedPtr, ObjectType const *InObject, TSharedFromThis< OtherType, Mode > const *InShareable)
 
template<class SharedRefType , class ObjectType , class OtherType , int Mode>
FORCEINLINE void SharedPointerInternals::EnableSharedFromThis (TSharedRef< SharedRefType, Mode > const *InSharedRef, ObjectType const *InObject, TSharedFromThis< OtherType, Mode > const *InShareable)
 
template<class SharedRefType , class ObjectType , class OtherType , int Mode>
FORCEINLINE void SharedPointerInternals::EnableSharedFromThis (TSharedRef< SharedRefType, Mode > *InSharedRef, ObjectType const *InObject, TSharedFromThis< OtherType, Mode > const *InShareable)
 
FORCEINLINE void SharedPointerInternals::EnableSharedFromThis (...)
 

Macro Definition Documentation

◆ FORCE_THREADSAFE_SHAREDPTRS

#define FORCE_THREADSAFE_SHAREDPTRS   PLATFORM_WEAKLY_CONSISTENT_MEMORY

Default behavior.

Definition at line 15 of file SharedPointerInternals.h.

◆ THREAD_SANITISE_UNSAFEPTR

#define THREAD_SANITISE_UNSAFEPTR   0

Definition at line 16 of file SharedPointerInternals.h.

◆ TSAN_SAFE

#define TSAN_SAFE

Definition at line 18 of file SharedPointerInternals.h.

◆ TSAN_SAFE_UNSAFEPTR

#define TSAN_SAFE_UNSAFEPTR   TSAN_SAFE

Definition at line 23 of file SharedPointerInternals.h.

Enumeration Type Documentation

◆ ESPMode

enum ESPMode

int is used select between either 'fast' or 'thread safe' shared pointer types. This is only used by templates at compile time to generate one code path or another.

Enumerator
NotThreadSafe 

Forced to be not thread-safe.

Fast 

Fast, doesn't ever use atomic interlocks. Some code requires that all shared pointers are thread-safe. It's better to change it here, instead of replacing ESPMode::Fast to ESPMode::ThreadSafe throughout the code.

ThreadSafe 

Conditionally thread-safe, never spin locks, but slower

Definition at line 30 of file SharedPointerInternals.h.