|
| FCbWriter () |
|
| ~FCbWriter () |
|
| FCbWriter (const FCbWriter &)=delete |
|
FCbWriter & | operator= (const FCbWriter &)=delete |
|
void | Reset () |
|
FCbFieldIterator | Save () const |
|
FCbFieldViewIterator | Save (FMutableMemoryView Buffer) const |
|
void | Save (FArchive &Ar) const |
|
uint64 | GetSaveSize () const |
|
FCbWriter & | SetName (FUtf8StringView Name) |
|
void | AddField (FUtf8StringView Name, const FCbFieldView &Value) |
|
void | AddField (const FCbFieldView &Value) |
|
void | AddField (FUtf8StringView Name, const FCbField &Value) |
|
void | AddField (const FCbField &Value) |
|
void | BeginObject (FUtf8StringView Name) |
|
void | BeginObject () |
|
void | EndObject () |
|
void | AddObject (FUtf8StringView Name, const FCbObjectView &Value) |
|
void | AddObject (const FCbObjectView &Value) |
|
void | AddObject (FUtf8StringView Name, const FCbObject &Value) |
|
void | AddObject (const FCbObject &Value) |
|
void | BeginArray (FUtf8StringView Name) |
|
void | BeginArray () |
|
void | EndArray () |
|
void | AddArray (FUtf8StringView Name, const FCbArrayView &Value) |
|
void | AddArray (const FCbArrayView &Value) |
|
void | AddArray (FUtf8StringView Name, const FCbArray &Value) |
|
void | AddArray (const FCbArray &Value) |
|
void | AddNull (FUtf8StringView Name) |
|
void | AddNull () |
|
void | AddBinary (FUtf8StringView Name, const void *Value, uint64 Size) |
|
void | AddBinary (const void *Value, uint64 Size) |
|
void | AddBinary (FUtf8StringView Name, FMemoryView Value) |
|
void | AddBinary (FMemoryView Value) |
|
void | AddBinary (FUtf8StringView Name, const FSharedBuffer &Value) |
|
void | AddBinary (const FSharedBuffer &Value) |
|
void | AddBinary (FUtf8StringView Name, const FCompositeBuffer &Value) |
|
void | AddBinary (const FCompositeBuffer &Value) |
|
void | AddString (FUtf8StringView Name, FUtf8StringView Value) |
|
void | AddString (FUtf8StringView Value) |
|
void | AddString (FUtf8StringView Name, FWideStringView Value) |
|
void | AddString (FWideStringView Value) |
|
void | AddInteger (FUtf8StringView Name, int32 Value) |
|
void | AddInteger (int32 Value) |
|
void | AddInteger (FUtf8StringView Name, int64 Value) |
|
void | AddInteger (int64 Value) |
|
void | AddInteger (FUtf8StringView Name, uint32 Value) |
|
void | AddInteger (uint32 Value) |
|
void | AddInteger (FUtf8StringView Name, uint64 Value) |
|
void | AddInteger (uint64 Value) |
|
void | AddFloat (FUtf8StringView Name, float Value) |
|
void | AddFloat (float Value) |
|
void | AddFloat (FUtf8StringView Name, double Value) |
|
void | AddFloat (double Value) |
|
void | AddBool (FUtf8StringView Name, bool bValue) |
|
void | AddBool (bool bValue) |
|
void | AddObjectAttachment (FUtf8StringView Name, const FIoHash &Value) |
|
void | AddObjectAttachment (const FIoHash &Value) |
|
void | AddBinaryAttachment (FUtf8StringView Name, const FIoHash &Value) |
|
void | AddBinaryAttachment (const FIoHash &Value) |
|
void | AddAttachment (FUtf8StringView Name, const FCbAttachment &Attachment) |
|
void | AddAttachment (const FCbAttachment &Attachment) |
|
void | AddHash (FUtf8StringView Name, const FIoHash &Value) |
|
void | AddHash (const FIoHash &Value) |
|
void | AddUuid (FUtf8StringView Name, const FGuid &Value) |
|
void | AddUuid (const FGuid &Value) |
|
void | AddDateTimeTicks (FUtf8StringView Name, int64 Ticks) |
|
void | AddDateTimeTicks (int64 Ticks) |
|
void | AddDateTime (FUtf8StringView Name, FDateTime Value) |
|
void | AddDateTime (FDateTime Value) |
|
void | AddTimeSpanTicks (FUtf8StringView Name, int64 Ticks) |
|
void | AddTimeSpanTicks (int64 Ticks) |
|
void | AddTimeSpan (FUtf8StringView Name, FTimespan Value) |
|
void | AddTimeSpan (FTimespan Value) |
|
void | AddObjectId (FUtf8StringView Name, const FCbObjectId &Value) |
|
void | AddObjectId (const FCbObjectId &Value) |
|
void | AddCustom (FUtf8StringView FieldName, uint64 TypeId, FMemoryView Value) |
|
void | AddCustom (uint64 TypeId, FMemoryView Value) |
|
void | AddCustom (FUtf8StringView FieldName, FUtf8StringView TypeName, FMemoryView Value) |
|
void | AddCustom (FUtf8StringView TypeName, FMemoryView Value) |
|
FCbWriter & | operator<< (FUtf8StringView NameOrValue) |
|
FCbWriter & | operator<< (const ANSICHAR *NameOrValue) |
|
FCbWriter & | operator<< (const UTF8CHAR *NameOrValue) |
|
FCbWriter & | operator<< (const FCbFieldView &Value) |
|
FCbWriter & | operator<< (const FCbField &Value) |
|
FCbWriter & | operator<< (const FCbObjectView &Value) |
|
FCbWriter & | operator<< (const FCbObject &Value) |
|
FCbWriter & | operator<< (const FCbArrayView &Value) |
|
FCbWriter & | operator<< (const FCbArray &Value) |
|
FCbWriter & | operator<< (nullptr_t) |
|
FCbWriter & | operator<< (FWideStringView Value) |
|
FCbWriter & | operator<< (const WIDECHAR *Value) |
|
FCbWriter & | operator<< (int32 Value) |
|
FCbWriter & | operator<< (int64 Value) |
|
FCbWriter & | operator<< (uint32 Value) |
|
FCbWriter & | operator<< (uint64 Value) |
|
FCbWriter & | operator<< (float Value) |
|
FCbWriter & | operator<< (double Value) |
|
FCbWriter & | operator<< (bool Value) |
|
FCbWriter & | operator<< (const FCbAttachment &Attachment) |
|
FCbWriter & | operator<< (const FIoHash &Value) |
|
FCbWriter & | operator<< (const FGuid &Value) |
|
FCbWriter & | operator<< (FDateTime Value) |
|
FCbWriter & | operator<< (FTimespan Value) |
|
FCbWriter & | operator<< (const FCbObjectId &Value) |
|
FCbWriter & | operator<< (FName Value) |
|
template<typename T , typename Allocator , std::void_t< decltype(std::declval< FCbWriter & >()<< std::declval< const T & >())> * = nullptr> |
FCbWriter & | operator<< (const TArray< T, Allocator > &Value) |
|
A writer for compact binary object, arrays, and fields.
The writer produces a sequence of fields that can be saved to a provided memory buffer or into a new owned buffer. The typical use case is to write a single object, which can be accessed by calling Save().AsObject() or Save(Buffer).AsObjectView().
The writer will assert on most incorrect usage and will always produce valid compact binary if provided with valid input. The writer does not check for invalid UTF-8 string encoding, object fields with duplicate names, or invalid compact binary being copied from another source.
It is most convenient to use the streaming API for the writer, as demonstrated in the example.
When writing a small amount of compact binary data, TCbWriter can be more efficient as it uses a fixed-size stack buffer for storage before spilling onto the heap.
- See also
- TCbWriter
Example:
FCbObject WriteObject() { TCbWriter<256> Writer; Writer.BeginObject();
Writer << "Resize" << true; Writer << "MaxWidth" << 1024; Writer << "MaxHeight" << 1024;
Writer.BeginArray(); Writer << "FormatA" << "FormatB" << "FormatC"; Writer.EndArray();
Writer.EndObject(); return Writer.Save().AsObject(); }
Definition at line 67 of file CompactBinaryWriter.h.