Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
MemoryOps.h File Reference
#include "../BasicTypes.h"
#include "../HAL/UnrealMemory.h"
#include "EnableIf.h"
#include "AreTypesEqual.h"
#include "IsTriviallyCopyConstructible.h"
#include "UnrealTypeTraits.h"
#include <new>
#include "IsTriviallyCopyAssignable.h"
#include "IsTriviallyDestructible.h"
+ Include dependency graph for MemoryOps.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UE4MemoryOps_Private::TCanBitwiseRelocate< DestinationElementType, SourceElementType >
 

Namespaces

namespace  UE4MemoryOps_Private
 

Functions

template<typename ElementType >
FORCEINLINE TEnableIf<!TIsZeroConstructType< ElementType >::Value >::Type DefaultConstructItems (void *Address, int32 Count)
 
template<typename ElementType >
FORCEINLINE TEnableIf< TIsZeroConstructType< ElementType >::Value >::Type DefaultConstructItems (void *Elements, int32 Count)
 
template<typename ElementType >
FORCEINLINE TEnableIf<!TIsTriviallyDestructible< ElementType >::Value >::Type DestructItem (ElementType *Element)
 
template<typename ElementType >
FORCEINLINE TEnableIf< TIsTriviallyDestructible< ElementType >::Value >::Type DestructItem (ElementType *Element)
 
template<typename ElementType >
FORCEINLINE TEnableIf<!TIsTriviallyDestructible< ElementType >::Value >::Type DestructItems (ElementType *Element, int32 Count)
 
template<typename ElementType >
FORCEINLINE TEnableIf< TIsTriviallyDestructible< ElementType >::Value >::Type DestructItems (ElementType *Elements, int32 Count)
 
template<typename DestinationElementType , typename SourceElementType >
FORCEINLINE TEnableIf<!TIsBitwiseConstructible< DestinationElementType, SourceElementType >::Value >::Type ConstructItems (void *Dest, const SourceElementType *Source, int32 Count)
 
template<typename DestinationElementType , typename SourceElementType >
FORCEINLINE TEnableIf< TIsBitwiseConstructible< DestinationElementType, SourceElementType >::Value >::Type ConstructItems (void *Dest, const SourceElementType *Source, int32 Count)
 
template<typename ElementType >
FORCEINLINE TEnableIf<!TIsTriviallyCopyAssignable< ElementType >::Value >::Type CopyAssignItems (ElementType *Dest, const ElementType *Source, int32 Count)
 
template<typename ElementType >
FORCEINLINE TEnableIf< TIsTriviallyCopyAssignable< ElementType >::Value >::Type CopyAssignItems (ElementType *Dest, const ElementType *Source, int32 Count)
 
template<typename DestinationElementType , typename SourceElementType >
FORCEINLINE TEnableIf<!UE4MemoryOps_Private::TCanBitwiseRelocate< DestinationElementType, SourceElementType >::Value >::Type RelocateConstructItems (void *Dest, const SourceElementType *Source, int32 Count)
 
template<typename DestinationElementType , typename SourceElementType >
FORCEINLINE TEnableIf< UE4MemoryOps_Private::TCanBitwiseRelocate< DestinationElementType, SourceElementType >::Value >::Type RelocateConstructItems (void *Dest, const SourceElementType *Source, int32 Count)
 
template<typename ElementType >
FORCEINLINE TEnableIf<!TIsTriviallyCopyConstructible< ElementType >::Value >::Type MoveConstructItems (void *Dest, const ElementType *Source, int32 Count)
 
template<typename ElementType >
FORCEINLINE TEnableIf< TIsTriviallyCopyConstructible< ElementType >::Value >::Type MoveConstructItems (void *Dest, const ElementType *Source, int32 Count)
 
template<typename ElementType >
FORCEINLINE TEnableIf<!TIsTriviallyCopyAssignable< ElementType >::Value >::Type MoveAssignItems (ElementType *Dest, const ElementType *Source, int32 Count)
 
template<typename ElementType >
FORCEINLINE TEnableIf< TIsTriviallyCopyAssignable< ElementType >::Value >::Type MoveAssignItems (ElementType *Dest, const ElementType *Source, int32 Count)
 
template<typename ElementType >
FORCEINLINE TEnableIf< TTypeTraits< ElementType >::IsBytewiseComparable, bool >::Type CompareItems (const ElementType *A, const ElementType *B, int32 Count)
 
template<typename ElementType >
FORCEINLINE TEnableIf<!TTypeTraits< ElementType >::IsBytewiseComparable, bool >::Type CompareItems (const ElementType *A, const ElementType *B, int32 Count)
 

Function Documentation

◆ CompareItems() [1/2]

template<typename ElementType >
FORCEINLINE TEnableIf< TTypeTraits< ElementType >::IsBytewiseComparable, bool >::Type CompareItems ( const ElementType * A,
const ElementType * B,
int32 Count )

Definition at line 256 of file MemoryOps.h.

◆ CompareItems() [2/2]

template<typename ElementType >
FORCEINLINE TEnableIf<!TTypeTraits< ElementType >::IsBytewiseComparable, bool >::Type CompareItems ( const ElementType * A,
const ElementType * B,
int32 Count )

Definition at line 263 of file MemoryOps.h.

◆ ConstructItems() [1/2]

template<typename DestinationElementType , typename SourceElementType >
FORCEINLINE TEnableIf<!TIsBitwiseConstructible< DestinationElementType, SourceElementType >::Value >::Type ConstructItems ( void * Dest,
const SourceElementType * Source,
int32 Count )

Constructs a range of items into memory from a set of arguments. The arguments come from an another array.

Parameters
DestThe memory location to start copying into.
SourceA pointer to the first argument to pass to the constructor.
CountThe number of elements to copy.

Definition at line 122 of file MemoryOps.h.

◆ ConstructItems() [2/2]

template<typename DestinationElementType , typename SourceElementType >
FORCEINLINE TEnableIf< TIsBitwiseConstructible< DestinationElementType, SourceElementType >::Value >::Type ConstructItems ( void * Dest,
const SourceElementType * Source,
int32 Count )

Definition at line 135 of file MemoryOps.h.

◆ CopyAssignItems() [1/2]

template<typename ElementType >
FORCEINLINE TEnableIf<!TIsTriviallyCopyAssignable< ElementType >::Value >::Type CopyAssignItems ( ElementType * Dest,
const ElementType * Source,
int32 Count )

Copy assigns a range of items.

Parameters
DestThe memory location to start assigning to.
SourceA pointer to the first item to assign.
CountThe number of elements to assign.

Definition at line 149 of file MemoryOps.h.

◆ CopyAssignItems() [2/2]

template<typename ElementType >
FORCEINLINE TEnableIf< TIsTriviallyCopyAssignable< ElementType >::Value >::Type CopyAssignItems ( ElementType * Dest,
const ElementType * Source,
int32 Count )

Definition at line 162 of file MemoryOps.h.

+ Here is the caller graph for this function:

◆ DefaultConstructItems() [1/2]

template<typename ElementType >
FORCEINLINE TEnableIf<!TIsZeroConstructType< ElementType >::Value >::Type DefaultConstructItems ( void * Address,
int32 Count )

Default constructs a range of items in memory.

Parameters
ElementsThe address of the first memory location to construct at.
CountThe number of elements to destruct.

Definition at line 43 of file MemoryOps.h.

◆ DefaultConstructItems() [2/2]

template<typename ElementType >
FORCEINLINE TEnableIf< TIsZeroConstructType< ElementType >::Value >::Type DefaultConstructItems ( void * Elements,
int32 Count )

Definition at line 56 of file MemoryOps.h.

◆ DestructItem() [1/2]

template<typename ElementType >
FORCEINLINE TEnableIf<!TIsTriviallyDestructible< ElementType >::Value >::Type DestructItem ( ElementType * Element)

Destructs a single item in memory.

Parameters
ElementsA pointer to the item to destruct.
Note
: This function is optimized for values of T, and so will not dynamically dispatch destructor calls if T's destructor is virtual.

Definition at line 70 of file MemoryOps.h.

◆ DestructItem() [2/2]

template<typename ElementType >
FORCEINLINE TEnableIf< TIsTriviallyDestructible< ElementType >::Value >::Type DestructItem ( ElementType * Element)

Definition at line 80 of file MemoryOps.h.

◆ DestructItems() [1/2]

template<typename ElementType >
FORCEINLINE TEnableIf<!TIsTriviallyDestructible< ElementType >::Value >::Type DestructItems ( ElementType * Element,
int32 Count )

Destructs a range of items in memory.

Parameters
ElementsA pointer to the first item to destruct.
CountThe number of elements to destruct.
Note
: This function is optimized for values of T, and so will not dynamically dispatch destructor calls if T's destructor is virtual.

Definition at line 94 of file MemoryOps.h.

◆ DestructItems() [2/2]

template<typename ElementType >
FORCEINLINE TEnableIf< TIsTriviallyDestructible< ElementType >::Value >::Type DestructItems ( ElementType * Elements,
int32 Count )

Definition at line 109 of file MemoryOps.h.

◆ MoveAssignItems() [1/2]

template<typename ElementType >
FORCEINLINE TEnableIf<!TIsTriviallyCopyAssignable< ElementType >::Value >::Type MoveAssignItems ( ElementType * Dest,
const ElementType * Source,
int32 Count )

Move assigns a range of items.

Parameters
DestThe memory location to start move assigning to.
SourceA pointer to the first item to move assign.
CountThe number of elements to move assign.

Definition at line 238 of file MemoryOps.h.

◆ MoveAssignItems() [2/2]

template<typename ElementType >
FORCEINLINE TEnableIf< TIsTriviallyCopyAssignable< ElementType >::Value >::Type MoveAssignItems ( ElementType * Dest,
const ElementType * Source,
int32 Count )

Definition at line 250 of file MemoryOps.h.

◆ MoveConstructItems() [1/2]

template<typename ElementType >
FORCEINLINE TEnableIf<!TIsTriviallyCopyConstructible< ElementType >::Value >::Type MoveConstructItems ( void * Dest,
const ElementType * Source,
int32 Count )

Move constructs a range of items into memory.

Parameters
DestThe memory location to start moving into.
SourceA pointer to the first item to move from.
CountThe number of elements to move.

Definition at line 213 of file MemoryOps.h.

◆ MoveConstructItems() [2/2]

template<typename ElementType >
FORCEINLINE TEnableIf< TIsTriviallyCopyConstructible< ElementType >::Value >::Type MoveConstructItems ( void * Dest,
const ElementType * Source,
int32 Count )

Definition at line 225 of file MemoryOps.h.

◆ RelocateConstructItems() [1/2]

template<typename DestinationElementType , typename SourceElementType >
FORCEINLINE TEnableIf<!UE4MemoryOps_Private::TCanBitwiseRelocate< DestinationElementType, SourceElementType >::Value >::Type RelocateConstructItems ( void * Dest,
const SourceElementType * Source,
int32 Count )

Relocates a range of items to a new memory location as a new type. This is a so-called 'destructive move' for which there is no single operation in C++ but which can be implemented very efficiently in general.

Parameters
DestThe memory location to relocate to.
SourceA pointer to the first item to relocate.
CountThe number of elements to relocate.

Definition at line 177 of file MemoryOps.h.

◆ RelocateConstructItems() [2/2]

template<typename DestinationElementType , typename SourceElementType >
FORCEINLINE TEnableIf< UE4MemoryOps_Private::TCanBitwiseRelocate< DestinationElementType, SourceElementType >::Value >::Type RelocateConstructItems ( void * Dest,
const SourceElementType * Source,
int32 Count )

Definition at line 192 of file MemoryOps.h.

+ Here is the call graph for this function: