Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FCbField Class Reference

#include <CompactBinary.h>

+ Inheritance diagram for FCbField:
+ Collaboration diagram for FCbField:

Public Member Functions

FCbObject AsObject () &
 
FCbObject AsObject () &&
 
FCbArray AsArray () &
 
FCbArray AsArray () &&
 
FSharedBuffer AsBinary (const FSharedBuffer &Default=FSharedBuffer()) &
 
FSharedBuffer AsBinary (const FSharedBuffer &Default=FSharedBuffer()) &&
 
FCompositeBuffer GetBuffer () const
 
 TCbBuffer ()=default
 
 TCbBuffer (FSharedBuffer ValueBuffer, ECbFieldType Type=ECbFieldType::HasFieldType)
 
 TCbBuffer (const ViewType &Value, FSharedBuffer OuterBuffer)
 
template<typename OtherViewType >
 TCbBuffer (const ViewType &Value, TCbBuffer< OtherViewType > OuterBuffer)
 
- Public Member Functions inherited from TCbBuffer< FCbFieldView >
 TCbBuffer ()=default
 
 TCbBuffer (FSharedBuffer ValueBuffer, ECbFieldType Type=ECbFieldType::HasFieldType)
 
 TCbBuffer (const FCbFieldView &Value, FSharedBuffer OuterBuffer)
 
 TCbBuffer (const FCbFieldView &Value, TCbBuffer< OtherViewType > OuterBuffer)
 
void Reset ()
 
bool IsOwned () const
 
void MakeOwned ()
 
const FCbFieldViewAsView () const
 
const FSharedBufferGetOuterBuffer () const &
 
FSharedBuffer GetOuterBuffer () &&
 
FCbField operator[] (FUtf8StringView Name) const
 
FCbFieldIterator CreateIterator () const
 
FCbFieldIterator begin () const
 
constexpr FCbIteratorSentinel end () const
 
- Public Member Functions inherited from FCbFieldView
constexpr FCbFieldView ()=default
 
 FCbFieldView (const void *Data, ECbFieldType Type=ECbFieldType::HasFieldType)
 
 FCbFieldView (const FCbValue &Value)
 
constexpr FCbFieldView RemoveName () const
 
constexpr FUtf8StringView GetName () const
 
FCbValue GetValue () const
 
FCbObjectView AsObjectView ()
 
FCbArrayView AsArrayView ()
 
FMemoryView AsBinaryView (FMemoryView Default=FMemoryView())
 
FUtf8StringView AsString (FUtf8StringView Default=FUtf8StringView())
 
int8 AsInt8 (int8 Default=0)
 
int16 AsInt16 (int16 Default=0)
 
int32 AsInt32 (int32 Default=0)
 
int64 AsInt64 (int64 Default=0)
 
uint8 AsUInt8 (uint8 Default=0)
 
uint16 AsUInt16 (uint16 Default=0)
 
uint32 AsUInt32 (uint32 Default=0)
 
uint64 AsUInt64 (uint64 Default=0)
 
float AsFloat (float Default=0.0f)
 
double AsDouble (double Default=0.0)
 
bool AsBool (bool bDefault=false)
 
FIoHash AsObjectAttachment (const FIoHash &Default=FIoHash())
 
FIoHash AsBinaryAttachment (const FIoHash &Default=FIoHash())
 
FIoHash AsAttachment (const FIoHash &Default=FIoHash())
 
FIoHash AsHash (const FIoHash &Default=FIoHash())
 
FGuid AsUuid ()
 
FGuid AsUuid (const FGuid &Default)
 
int64 AsDateTimeTicks (int64 Default=0)
 
FDateTime AsDateTime ()
 
FDateTime AsDateTime (FDateTime Default)
 
int64 AsTimeSpanTicks (int64 Default=0)
 
FTimespan AsTimeSpan ()
 
FTimespan AsTimeSpan (FTimespan Default)
 
FCbObjectId AsObjectId (const FCbObjectId &Default=FCbObjectId())
 
FCbCustomById AsCustomById (FCbCustomById Default=FCbCustomById())
 
FCbCustomByName AsCustomByName (FCbCustomByName Default=FCbCustomByName())
 
FMemoryView AsCustom (uint64 Id, FMemoryView Default=FMemoryView())
 
FMemoryView AsCustom (FUtf8StringView Name, FMemoryView Default=FMemoryView())
 
constexpr bool HasName () const
 
constexpr bool IsNull () const
 
constexpr bool IsObject () const
 
constexpr bool IsArray () const
 
constexpr bool IsBinary () const
 
constexpr bool IsString () const
 
constexpr bool IsInteger () const
 
constexpr bool IsFloat () const
 
constexpr bool IsBool () const
 
constexpr bool IsObjectAttachment () const
 
constexpr bool IsBinaryAttachment () const
 
constexpr bool IsAttachment () const
 
constexpr bool IsHash () const
 
constexpr bool IsUuid () const
 
constexpr bool IsDateTime () const
 
constexpr bool IsTimeSpan () const
 
constexpr bool IsObjectId () const
 
constexpr bool IsCustomById () const
 
constexpr bool IsCustomByName () const
 
constexpr operator bool () const
 
constexpr bool HasValue () const
 
constexpr bool HasError () const
 
constexpr ECbFieldError GetError () const
 
uint64 GetSize () const
 
FIoHash GetHash () const
 
void AppendHash (FIoHashBuilder &Builder) const
 
bool Equals (const FCbFieldView &Other) const
 
void CopyTo (FMutableMemoryView Buffer) const
 
void CopyTo (FArchive &Ar) const
 
void IterateAttachments (FCbFieldVisitor Visitor) const
 
bool TryGetView (FMemoryView &OutView) const
 
FCbFieldView operator[] (FUtf8StringView Name) const
 
FCbFieldViewIterator CreateViewIterator () const
 
FCbFieldViewIterator begin () const
 
constexpr FCbIteratorSentinel end () const
 

Additional Inherited Members

- Static Public Member Functions inherited from TCbBufferFactory< FCbField, FCbFieldView >
static FCbField Clone (const void *const Data)
 
static FCbField Clone (const FCbFieldView &Value)
 
static FCbField MakeView (const void *const Data, FSharedBuffer OuterBuffer=FSharedBuffer())
 
static FCbField MakeView (const FCbFieldView &Value, FSharedBuffer OuterBuffer=FSharedBuffer())
 
- Protected Member Functions inherited from FCbFieldView
FMemoryView GetView () const
 
FMemoryView GetViewNoType () const
 
FMemoryView GetValueView () const
 
constexpr ECbFieldType GetType () const
 
constexpr ECbFieldType GetTypeWithFlags () const
 
constexpr const voidGetValueData () const
 
const voidGetValueEnd () const
 
uint64 GetValueSize () const
 
void Assign (const void *InData, const ECbFieldType InType)
 

Detailed Description

A field that includes a shared buffer for the memory that contains it.

See also
FCbFieldView
TCbBuffer

Definition at line 1248 of file CompactBinary.h.

Member Function Documentation

◆ AsArray() [1/2]

FCbArray FCbField::AsArray ( ) &
inline

Access the field as an array. Defaults to an empty array on error.

Definition at line 1433 of file CompactBinary.h.

◆ AsArray() [2/2]

FCbArray FCbField::AsArray ( ) &&
inline

Definition at line 1438 of file CompactBinary.h.

◆ AsBinary() [1/2]

FSharedBuffer FCbField::AsBinary ( const FSharedBuffer & Default = FSharedBuffer()) &
inline

Access the field as binary. Returns the provided default on error.

Definition at line 1443 of file CompactBinary.h.

◆ AsBinary() [2/2]

FSharedBuffer FCbField::AsBinary ( const FSharedBuffer & Default = FSharedBuffer()) &&
inline

Definition at line 1449 of file CompactBinary.h.

◆ AsObject() [1/2]

FCbObject FCbField::AsObject ( ) &
inline

Access the field as an object. Defaults to an empty object on error.

Definition at line 1423 of file CompactBinary.h.

◆ AsObject() [2/2]

FCbObject FCbField::AsObject ( ) &&
inline

Definition at line 1428 of file CompactBinary.h.

◆ GetBuffer()

FCompositeBuffer FCbField::GetBuffer ( ) const

Returns a buffer that contains the field as it would be serialized by CopyTo.

◆ TCbBuffer() [1/4]

TCbBuffer< ViewType >::TCbBuffer ( )
default

Construct a default value.

◆ TCbBuffer() [2/4]

TCbBuffer< ViewType >::TCbBuffer ( const ViewType & Value,
FSharedBuffer OuterBuffer )
inline

Construct a value that holds a reference to the buffer that contains it.

Definition at line 1132 of file CompactBinary.h.

◆ TCbBuffer() [3/4]

template<typename OtherViewType >
TCbBuffer< ViewType >::TCbBuffer ( const ViewType & Value,
TCbBuffer< OtherViewType > OuterBuffer )
inline

Construct a value that holds a reference to the buffer of the outer that contains it.

Definition at line 1144 of file CompactBinary.h.

◆ TCbBuffer() [4/4]

TCbBuffer< ViewType >::TCbBuffer ( FSharedBuffer ValueBuffer,
ECbFieldType Type = ECbFieldType::HasFieldType )
inlineexplicit

Construct a value from a pointer to its data and an optional externally-provided type.

Parameters
ValueBufferA buffer that exactly contains the value.
TypeHasFieldType means that ValueBuffer contains the type. Otherwise, use the given type.

Definition at line 1121 of file CompactBinary.h.


The documentation for this class was generated from the following file: