Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TIndexedPtrBase< T, PtrType > Class Template Reference

#include <MemoryImage.h>

Public Types

using FPtrTable = TPtrTableBase<T, PtrType>
 

Public Member Functions

 TIndexedPtrBase (T *InPtr=nullptr)
 
 ~TIndexedPtrBase ()
 
 TIndexedPtrBase (const TIndexedPtrBase< T, PtrType > &Rhs)
 
 TIndexedPtrBase (const TIndexedPtrBase< T, PtrType > &Rhs, const FPtrTable &InTable)
 
TIndexedPtrBaseoperator= (T *Rhs)
 
TIndexedPtrBaseoperator= (const PtrType &Rhs)
 
TIndexedPtrBaseoperator= (PtrType &&Rhs)
 
bool IsFrozen () const
 
bool IsValid () const
 
bool IsNull () const
 
void SafeRelease ()
 
TGet (const FPtrTable &PtrTable) const
 
TGet (const FPointerTableBase *PtrTable) const
 
TGetUnfrozen () const
 

Private Types

enum  { IsFrozenMask = (1 << 0) , IndexShift = 1 }
 

Static Private Member Functions

static void SafeReleaseImpl (T *&InPtr)
 
static void SafeReleaseImpl (TRefCountPtr< T > &InPtr)
 

Private Attributes

union { 
 
   PtrType   Ptr 
 
   uint64   PackedIndex 
 
};  
 

Detailed Description

template<typename T, typename PtrType>
class TIndexedPtrBase< T, PtrType >

Note that IndexedPtr types don't declare a default intrinsic type layout. Instead any required pointer types need to be declared/implemented using DECLARE_EXPORTED_TEMPLATE_INTRINSIC_TYPE_LAYOUT/IMPLEMENT_TEMPLATE_INTRINSIC_TYPE_LAYOUT. The TypeDesc of indexed pointers are compared for equality when adding to pointer tables, and it's possible for inline type layouts to generate multiple copies when referenced from multiple modules

Definition at line 1041 of file MemoryImage.h.

Member Typedef Documentation

◆ FPtrTable

template<typename T , typename PtrType >
using TIndexedPtrBase< T, PtrType >::FPtrTable = TPtrTableBase<T, PtrType>

Definition at line 1044 of file MemoryImage.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename T , typename PtrType >
anonymous enum
private
Enumerator
IsFrozenMask 
IndexShift 

Definition at line 1115 of file MemoryImage.h.

Constructor & Destructor Documentation

◆ TIndexedPtrBase() [1/3]

template<typename T , typename PtrType >
TIndexedPtrBase< T, PtrType >::TIndexedPtrBase ( T * InPtr = nullptr)
inline

Definition at line 1046 of file MemoryImage.h.

◆ ~TIndexedPtrBase()

template<typename T , typename PtrType >
TIndexedPtrBase< T, PtrType >::~TIndexedPtrBase ( )
inline

Definition at line 1047 of file MemoryImage.h.

◆ TIndexedPtrBase() [2/3]

template<typename T , typename PtrType >
TIndexedPtrBase< T, PtrType >::TIndexedPtrBase ( const TIndexedPtrBase< T, PtrType > & Rhs)
inline

Definition at line 1050 of file MemoryImage.h.

◆ TIndexedPtrBase() [3/3]

template<typename T , typename PtrType >
TIndexedPtrBase< T, PtrType >::TIndexedPtrBase ( const TIndexedPtrBase< T, PtrType > & Rhs,
const FPtrTable & InTable )
inline

Definition at line 1052 of file MemoryImage.h.

Member Function Documentation

◆ Get() [1/2]

template<typename T , typename PtrType >
T * TIndexedPtrBase< T, PtrType >::Get ( const FPointerTableBase * PtrTable) const
inline

Definition at line 1101 of file MemoryImage.h.

◆ Get() [2/2]

template<typename T , typename PtrType >
T * TIndexedPtrBase< T, PtrType >::Get ( const FPtrTable & PtrTable) const
inline

Definition at line 1092 of file MemoryImage.h.

◆ GetUnfrozen()

template<typename T , typename PtrType >
T * TIndexedPtrBase< T, PtrType >::GetUnfrozen ( ) const
inline

Definition at line 1112 of file MemoryImage.h.

◆ IsFrozen()

template<typename T , typename PtrType >
bool TIndexedPtrBase< T, PtrType >::IsFrozen ( ) const
inline

Definition at line 1080 of file MemoryImage.h.

◆ IsNull()

template<typename T , typename PtrType >
bool TIndexedPtrBase< T, PtrType >::IsNull ( ) const
inline

Definition at line 1082 of file MemoryImage.h.

◆ IsValid()

template<typename T , typename PtrType >
bool TIndexedPtrBase< T, PtrType >::IsValid ( ) const
inline

Definition at line 1081 of file MemoryImage.h.

◆ operator=() [1/3]

template<typename T , typename PtrType >
TIndexedPtrBase & TIndexedPtrBase< T, PtrType >::operator= ( const PtrType & Rhs)
inline

Definition at line 1064 of file MemoryImage.h.

◆ operator=() [2/3]

template<typename T , typename PtrType >
TIndexedPtrBase & TIndexedPtrBase< T, PtrType >::operator= ( PtrType && Rhs)
inline

Definition at line 1072 of file MemoryImage.h.

◆ operator=() [3/3]

template<typename T , typename PtrType >
TIndexedPtrBase & TIndexedPtrBase< T, PtrType >::operator= ( T * Rhs)
inline

Definition at line 1054 of file MemoryImage.h.

◆ SafeRelease()

template<typename T , typename PtrType >
void TIndexedPtrBase< T, PtrType >::SafeRelease ( )
inline

Definition at line 1084 of file MemoryImage.h.

◆ SafeReleaseImpl() [1/2]

template<typename T , typename PtrType >
static void TIndexedPtrBase< T, PtrType >::SafeReleaseImpl ( T *& InPtr)
inlinestaticprivate

Definition at line 1121 of file MemoryImage.h.

◆ SafeReleaseImpl() [2/2]

template<typename T , typename PtrType >
static void TIndexedPtrBase< T, PtrType >::SafeReleaseImpl ( TRefCountPtr< T > & InPtr)
inlinestaticprivate

Definition at line 1130 of file MemoryImage.h.

Member Data Documentation

◆ [union]

union { ... } TIndexedPtrBase< T, PtrType >

◆ PackedIndex

template<typename T , typename PtrType >
uint64 TIndexedPtrBase< T, PtrType >::PackedIndex

Definition at line 1139 of file MemoryImage.h.

◆ Ptr

template<typename T , typename PtrType >
PtrType TIndexedPtrBase< T, PtrType >::Ptr

Definition at line 1138 of file MemoryImage.h.


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