Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
WeakObjectPtrTemplates.h File Reference
#include "CoreTypes.h"
#include "Templates/IsPointer.h"
#include "Templates/PointerIsConvertibleFromTo.h"
#include "Templates/AndOrNot.h"
#include "Templates/LosesQualifiersFromTo.h"
#include "Containers/Map.h"
#include <type_traits>
+ Include dependency graph for WeakObjectPtrTemplates.h:

Go to the source code of this file.

Classes

struct  TWeakObjectPtr< T >
 
struct  TIsPODType< TWeakObjectPtr< T > >
 
struct  TIsZeroConstructType< TWeakObjectPtr< T > >
 
struct  TIsWeakPointerType< TWeakObjectPtr< T > >
 
struct  TWeakObjectPtrSetKeyFuncs< ElementType, bInAllowDuplicateKeys >
 
struct  TWeakObjectPtrMapKeyFuncs< KeyType, ValueType, bInAllowDuplicateKeys >
 
class  TAutoWeakObjectPtr< T >
 
struct  TIsPODType< TAutoWeakObjectPtr< T > >
 
struct  TIsZeroConstructType< TAutoWeakObjectPtr< T > >
 
struct  TIsWeakPointerType< TAutoWeakObjectPtr< T > >
 

Functions

template<typename LhsT , typename RhsT , typename OtherTWeakObjectPtrBase , typename = decltype((LhsT*)nullptr == (RhsT*)nullptr)>
FORCENOINLINE bool operator== (const LhsT *Lhs, const TWeakObjectPtr< RhsT, OtherTWeakObjectPtrBase > &Rhs)
 
template<typename RhsT , typename OtherTWeakObjectPtrBase >
FORCENOINLINE bool operator== (TYPE_OF_NULLPTR, const TWeakObjectPtr< RhsT, OtherTWeakObjectPtrBase > &Rhs)
 
template<typename LhsT , typename RhsT , typename OtherTWeakObjectPtrBase , typename = decltype((LhsT*)nullptr != (RhsT*)nullptr)>
FORCENOINLINE bool operator!= (const LhsT *Lhs, const TWeakObjectPtr< RhsT, OtherTWeakObjectPtrBase > &Rhs)
 
template<typename RhsT , typename OtherTWeakObjectPtrBase >
FORCENOINLINE bool operator!= (TYPE_OF_NULLPTR, const TWeakObjectPtr< RhsT, OtherTWeakObjectPtrBase > &Rhs)
 
template<typename T >
FORCEINLINE TWeakObjectPtr< TMakeWeakObjectPtr (T *Ptr)
 
template<typename DestArrayType , typename SourceArrayType >
void CopyFromWeakArray (DestArrayType &Dest, const SourceArrayType &Src)
 
template<typename T >
FORCEINLINE uint32 GetTypeHash (const TWeakObjectPtr< T > &WeakObjectPtr)
 
template<class T , class TWeakObjectPtrBase >
FArchiveoperator<< (FArchive &Ar, TWeakObjectPtr< T, TWeakObjectPtrBase > &WeakObjectPtr)
 

Function Documentation

◆ CopyFromWeakArray()

void CopyFromWeakArray ( DestArrayType & Dest,
const SourceArrayType & Src )

Utility function to fill in a TArray<ClassName*> from a TArray<TWeakObjectPtr<ClassName>>

Definition at line 414 of file WeakObjectPtrTemplates.h.

◆ GetTypeHash()

template<typename T >
FORCEINLINE uint32 GetTypeHash ( const TWeakObjectPtr< T > & WeakObjectPtr)

Hash function.

Definition at line 428 of file WeakObjectPtrTemplates.h.

◆ MakeWeakObjectPtr()

template<typename T >
FORCEINLINE TWeakObjectPtr< T > MakeWeakObjectPtr ( T * Ptr)

Definition at line 318 of file WeakObjectPtrTemplates.h.

◆ operator!=() [1/2]

template<typename LhsT , typename RhsT , typename OtherTWeakObjectPtrBase , typename = decltype((LhsT*)nullptr != (RhsT*)nullptr)>
FORCENOINLINE bool operator!= ( const LhsT * Lhs,
const TWeakObjectPtr< RhsT, OtherTWeakObjectPtrBase > & Rhs )

Compare weak pointers for inequality

Parameters
Otherweak pointer to compare to

Definition at line 304 of file WeakObjectPtrTemplates.h.

◆ operator!=() [2/2]

◆ operator<<()

template<class T , class TWeakObjectPtrBase >
FArchive & operator<< ( FArchive & Ar,
TWeakObjectPtr< T, TWeakObjectPtrBase > & WeakObjectPtr )

Weak object pointer serialization, this forwards to FArchive::operator<<(struct FWeakObjectPtr&) or an override

Definition at line 438 of file WeakObjectPtrTemplates.h.

◆ operator==() [1/2]

template<typename LhsT , typename RhsT , typename OtherTWeakObjectPtrBase , typename = decltype((LhsT*)nullptr == (RhsT*)nullptr)>
FORCENOINLINE bool operator== ( const LhsT * Lhs,
const TWeakObjectPtr< RhsT, OtherTWeakObjectPtrBase > & Rhs )

Compare weak pointers for equality. If both pointers would return nullptr from Get() they count as equal even if they were not initialized to the same object.

Parameters
Otherweak pointer to compare to

Definition at line 288 of file WeakObjectPtrTemplates.h.

◆ operator==() [2/2]