6#include "HAL/UnrealMemory.h"
7#include "Math/UnrealMathUtility.h"
8#include "Memory/MemoryView.h"
9#include "Containers/UnrealString.h"
10#include "Serialization/MemoryArchive.h"
11#include "Containers/ArrayView.h"
14
15
20
21
22
23
24
27 return TEXT(
"FMemoryReader");
32 return FMath::Min((int64)Bytes.Num(), LimitSize);
42 FMemory::Memcpy( Data, &Bytes[(int32)Offset], Num );
52 explicit FMemoryReader(
const TArray<uint8>& InBytes,
bool bIsPersistent =
false )
72
73
78
79
80
81
82
85 return TEXT(
"FMemoryReaderView");
90 return FMath::Min(
static_cast<int64>(Bytes.GetSize()), LimitSize);
100 FMutableMemoryView(Data,
static_cast<uint64>(Num)).CopyFrom(Bytes.Mid(Offset, Num));
void SetLimitSize(int64 NewLimitSize)
FMemoryReader(const TArray< uint8 > &InBytes, bool bIsPersistent=false)
virtual int64 TotalSize() override
void Serialize(void *Data, int64 Num)
const TArray< uint8 > & Bytes
virtual FString GetArchiveName() const override
virtual int64 TotalSize() override
void SetLimitSize(int64 NewLimitSize)
void Serialize(void *Data, int64 Num)
virtual FString GetArchiveName() const override
FMemoryReaderView(TArrayView< const uint8 > InBytes, bool bIsPersistent=false)
virtual void SetIsPersistent(bool bInIsPersistent)
FORCEINLINE bool IsError() const
virtual void SetIsLoading(bool bInIsLoading)