6#include "Misc/AssertionMacros.h"
7#include "HAL/UnrealMemory.h"
8#include "Math/NumericLimits.h"
9#include "Serialization/Archive.h"
10#include "Containers/UnrealString.h"
11#include "Logging/LogMacros.h"
12#include "Misc/EnumClassFlags.h"
25
26
27
32
33
34
35
36
37
64 if (NumBytesToAdd > 0)
68 const int64 NewArrayCount =
WriterSize + NumBytesToAdd;
71 UE_LOG(LogSerialization, Fatal,
TEXT(
"FBufferWriter does not support data larger than 2GB. Archive name: %s."), *GetArchiveName());
79 UE_LOG(LogSerialization, Fatal,
TEXT(
"FBufferWriter overflowed. Archive name: %s."), *GetArchiveName());
83 check(WriterPos >= 0);
84 check((WriterPos + Num) <= WriterSize);
99 check(InPos <= WriterSize);
107
108
109
110
111
#define ENUM_CLASS_FLAGS(Enum)
virtual FString GetArchiveName() const
void Serialize(void *Data, int64 Num)
FBufferWriter(void *Data, int64 Size, EBufferWriterFlags InFlags=EBufferWriterFlags::None)
FORCEINLINE bool IsError() const
virtual void SetIsSaving(bool bInIsSaving)
static void Free(void *Original)
static void * Realloc(void *Original, SIZE_T Size, uint32 Alignment=DEFAULT_ALIGNMENT)
static FORCEINLINE void * Memcpy(void *Dest, const void *Src, SIZE_T Count)