5#include "Containers/Array.h"
6#include "Containers/ContainersFwd.h"
7#include "Containers/StringFwd.h"
8#include "Containers/StringView.h"
10#include "HAL/PlatformCrt.h"
11#include "Memory/MemoryFwd.h"
12#include "Memory/MemoryView.h"
13#include "Serialization/CompactBinary.h"
17class FCompositeBuffer;
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
80
81
82
83
84
88
89
90
91
92
93
94
95
99
100
101
102
103
104
105
109
110
111
112
116
117
118
119
120
161 inline void AddBinary(FUtf8StringView Name,
const void* Value, uint64 Size) { SetName(Name);
AddBinary(Value
, Size
); }
164 inline void AddBinary(FUtf8StringView Name, FMemoryView Value) { SetName(Name); AddBinary(Value); }
165 inline void AddBinary(FMemoryView Value) { AddBinary(Value.GetData(), Value.GetSize()); }
169 inline void AddBinary(FUtf8StringView Name,
const FCompositeBuffer& Value) { SetName(Name);
AddBinary(Value
); }
173 inline void AddString(FUtf8StringView Name, FUtf8StringView Value) { SetName(Name); AddString(Value); }
176 inline void AddString(FUtf8StringView Name, FWideStringView Value) { SetName(Name); AddString(Value); }
214 inline void AddHash(FUtf8StringView Name,
const FIoHash& Value) { SetName(Name);
AddHash(Value
); }
241 inline void AddCustom(FUtf8StringView FieldName, uint64 TypeId, FMemoryView Value) { SetName(FieldName); AddCustom(TypeId, Value); }
245 inline void AddCustom(FUtf8StringView FieldName, FUtf8StringView TypeName, FMemoryView Value) { SetName(FieldName); AddCustom(TypeName, Value); }
246 void AddCustom(FUtf8StringView TypeName, FMemoryView Value);
249 enum class EStateFlags :
uint8;
297 inline FCbWriter& operator<<(FUtf8StringView NameOrValue)
299 SetNameOrAddString(NameOrValue);
304 inline FCbWriter& operator<<(
const ANSICHAR* NameOrValue)
306 return *
this << FAnsiStringView(NameOrValue);
310 inline FCbWriter& operator<<(
const UTF8CHAR* NameOrValue)
312 return *
this << FUtf8StringView(NameOrValue);
440 template <
typename T,
typename Allocator,
441 std::void_t<
decltype(std::declval<FCbWriter&>() << std::declval<
const T&>())>* =
nullptr>
457
458
459
460
461template <uint32 InlineBufferSize>
FCbWriter(int64 InitialSize)
void AddObject(const FCbObjectView &Value)
void AddObjectId(FUtf8StringView Name, const FCbObjectId &Value)
void AddString(FWideStringView Value)
void AddBinaryAttachment(FUtf8StringView Name, const FIoHash &Value)
void AddObject(FUtf8StringView Name, const FCbObject &Value)
void AddCustom(FUtf8StringView TypeName, FMemoryView Value)
FUtf8StringView GetActiveName() const
void AddHash(const FIoHash &Value)
void AddArray(const FCbArrayView &Value)
uint64 GetSaveSize() const
void AddFloat(FUtf8StringView Name, double Value)
void AddString(FUtf8StringView Value)
void BeginArray(FUtf8StringView Name)
void AddField(const FCbField &Value)
void AddBinary(FUtf8StringView Name, const void *Value, uint64 Size)
void AddBinary(FUtf8StringView Name, const FCompositeBuffer &Value)
void AddFloat(double Value)
void AddBinary(FUtf8StringView Name, const FSharedBuffer &Value)
void AddInteger(uint64 Value)
void AddAttachment(const FCbAttachment &Attachment)
void AddBinary(FUtf8StringView Name, FMemoryView Value)
void AddBool(bool bValue)
void Save(FArchive &Ar) const
void AddInteger(FUtf8StringView Name, uint64 Value)
FCbWriter(const FCbWriter &)=delete
void AddObjectAttachment(const FIoHash &Value)
void AddObject(const FCbObject &Value)
void SetNameOrAddString(FUtf8StringView NameOrValue)
void AddInteger(FUtf8StringView Name, int32 Value)
void AddDateTimeTicks(FUtf8StringView Name, int64 Ticks)
FCbWriter & operator=(const FCbWriter &)=delete
void AddBinaryAttachment(const FIoHash &Value)
void AddInteger(uint32 Value)
void AddField(FUtf8StringView Name, const FCbFieldView &Value)
void EndField(ECbFieldType Type)
FCbFieldIterator Save() const
void AddDateTimeTicks(int64 Ticks)
void AddUuid(FUtf8StringView Name, const FGuid &Value)
void AddString(FUtf8StringView Name, FUtf8StringView Value)
void AddCustom(FUtf8StringView FieldName, FUtf8StringView TypeName, FMemoryView Value)
void AddBool(FUtf8StringView Name, bool bValue)
void AddFloat(FUtf8StringView Name, float Value)
void AddArray(const FCbArray &Value)
void AddBinary(const FSharedBuffer &Value)
void AddFloat(float Value)
void AddTimeSpanTicks(FUtf8StringView Name, int64 Ticks)
void AddField(FUtf8StringView Name, const FCbField &Value)
void AddInteger(int32 Value)
void BeginObject(FUtf8StringView Name)
void AddNull(FUtf8StringView Name)
void AddTimeSpan(FUtf8StringView Name, FTimespan Value)
void AddUuid(const FGuid &Value)
void AddTimeSpanTicks(int64 Ticks)
void AddHash(FUtf8StringView Name, const FIoHash &Value)
void AddCustom(uint64 TypeId, FMemoryView Value)
void AddObjectId(const FCbObjectId &Value)
void AddArray(FUtf8StringView Name, const FCbArray &Value)
void AddInteger(int64 Value)
void AddDateTime(FUtf8StringView Name, FDateTime Value)
void AddObjectAttachment(FUtf8StringView Name, const FIoHash &Value)
void AddInteger(FUtf8StringView Name, int64 Value)
void AddField(const FCbFieldView &Value)
void AddBinary(FMemoryView Value)
void AddCustom(FUtf8StringView FieldName, uint64 TypeId, FMemoryView Value)
FCbFieldViewIterator Save(FMutableMemoryView Buffer) const
void AddBinary(const void *Value, uint64 Size)
void AddInteger(FUtf8StringView Name, uint32 Value)
void AddString(FUtf8StringView Name, FWideStringView Value)
void AddDateTime(FDateTime Value)
void AddObject(FUtf8StringView Name, const FCbObjectView &Value)
void AddBinary(const FCompositeBuffer &Value)
void MakeFieldsUniform(int64 FieldBeginOffset, int64 FieldEndOffset)
void AddTimeSpan(FTimespan Value)
void AddArray(FUtf8StringView Name, const FCbArrayView &Value)
FCbWriter & SetName(FUtf8StringView Name)
void AddAttachment(FUtf8StringView Name, const FCbAttachment &Attachment)
uint8 Buffer[InlineBufferSize]
TCbWriter & operator=(const TCbWriter &)=delete
TCbWriter(const TCbWriter &)=delete