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

#include <CompactBinaryValue.h>

Public Member Functions

 FCbValue (ECbFieldType Type, const void *Value)
 
FCbObjectView AsObjectView () const
 
FCbArrayView AsArrayView () const
 
FMemoryView AsBinary () const
 
FUtf8StringView AsString (ECbFieldError *OutError=nullptr, FUtf8StringView Default=FUtf8StringView()) const
 
uint64 AsInteger (UE::CompactBinary::Private::FIntegerParams Params, ECbFieldError *OutError=nullptr, uint64 Default=0) const
 
uint64 AsIntegerPositive () const
 
int64 AsIntegerNegative () const
 
float AsFloat32 () const
 
double AsFloat64 () const
 
bool AsBool () const
 
FORCEINLINE FIoHash AsObjectAttachment () const
 
FORCEINLINE FIoHash AsBinaryAttachment () const
 
FORCEINLINE FIoHash AsAttachment () const
 
FIoHash AsHash () const
 
FGuid AsUuid () const
 
int64 AsDateTimeTicks () const
 
int64 AsTimeSpanTicks () const
 
FCbObjectId AsObjectId () const
 
FCbCustomById AsCustomById () const
 
FCbCustomByName AsCustomByName () const
 
FORCEINLINE ECbFieldType GetType () const
 
FORCEINLINE const voidGetData () const
 

Private Attributes

const voidData
 
ECbFieldType Type
 

Detailed Description

A type that provides unchecked access to compact binary values.

The main purpose of the type is to efficiently switch on field type. For every other use case, prefer to use the field, array, and object types directly. The accessors here do not check the type before reading the value, which means they can read out of bounds even on a valid compact binary value if the wrong accessor is used.

Definition at line 22 of file CompactBinaryValue.h.

Constructor & Destructor Documentation

◆ FCbValue()

FORCEINLINE FCbValue::FCbValue ( ECbFieldType Type,
const void * Value )

Definition at line 83 of file CompactBinaryValue.h.

+ Here is the caller graph for this function:

Member Function Documentation

◆ AsArrayView()

FORCEINLINE FCbArrayView FCbValue::AsArrayView ( ) const

Definition at line 94 of file CompactBinaryValue.h.

◆ AsAttachment()

FORCEINLINE FIoHash FCbValue::AsAttachment ( ) const
inline

Definition at line 51 of file CompactBinaryValue.h.

◆ AsBinary()

FORCEINLINE FMemoryView FCbValue::AsBinary ( ) const

Definition at line 99 of file CompactBinaryValue.h.

+ Here is the call graph for this function:

◆ AsBinaryAttachment()

FORCEINLINE FIoHash FCbValue::AsBinaryAttachment ( ) const
inline

Definition at line 50 of file CompactBinaryValue.h.

◆ AsBool()

FORCEINLINE bool FCbValue::AsBool ( ) const

Definition at line 172 of file CompactBinaryValue.h.

◆ AsCustomById()

FORCEINLINE FCbCustomById FCbValue::AsCustomById ( ) const

Definition at line 207 of file CompactBinaryValue.h.

+ Here is the call graph for this function:

◆ AsCustomByName()

FORCEINLINE FCbCustomByName FCbValue::AsCustomByName ( ) const

Definition at line 221 of file CompactBinaryValue.h.

+ Here is the call graph for this function:

◆ AsDateTimeTicks()

FORCEINLINE int64 FCbValue::AsDateTimeTicks ( ) const

Definition at line 192 of file CompactBinaryValue.h.

◆ AsFloat32()

FORCEINLINE float FCbValue::AsFloat32 ( ) const

Definition at line 160 of file CompactBinaryValue.h.

◆ AsFloat64()

FORCEINLINE double FCbValue::AsFloat64 ( ) const

Definition at line 166 of file CompactBinaryValue.h.

◆ AsHash()

FORCEINLINE FIoHash FCbValue::AsHash ( ) const

Definition at line 177 of file CompactBinaryValue.h.

◆ AsInteger()

FORCEINLINE uint64 FCbValue::AsInteger ( UE::CompactBinary::Private::FIntegerParams Params,
ECbFieldError * OutError = nullptr,
uint64 Default = 0 ) const

Access as an integer, with both positive and negative values returned as unsigned.

Checks for range errors and uses the default if OutError is not null.

Definition at line 126 of file CompactBinaryValue.h.

+ Here is the call graph for this function:

◆ AsIntegerNegative()

FORCEINLINE int64 FCbValue::AsIntegerNegative ( ) const

Definition at line 154 of file CompactBinaryValue.h.

+ Here is the call graph for this function:

◆ AsIntegerPositive()

FORCEINLINE uint64 FCbValue::AsIntegerPositive ( ) const

Definition at line 148 of file CompactBinaryValue.h.

+ Here is the call graph for this function:

◆ AsObjectAttachment()

FORCEINLINE FIoHash FCbValue::AsObjectAttachment ( ) const
inline

Definition at line 49 of file CompactBinaryValue.h.

◆ AsObjectId()

FORCEINLINE FCbObjectId FCbValue::AsObjectId ( ) const

Definition at line 202 of file CompactBinaryValue.h.

◆ AsObjectView()

FORCEINLINE FCbObjectView FCbValue::AsObjectView ( ) const

Definition at line 89 of file CompactBinaryValue.h.

◆ AsString()

FORCEINLINE FUtf8StringView FCbValue::AsString ( ECbFieldError * OutError = nullptr,
FUtf8StringView Default = FUtf8StringView() ) const

Access as a string. Checks for range errors and uses the default if OutError is not null.

Definition at line 107 of file CompactBinaryValue.h.

+ Here is the call graph for this function:

◆ AsTimeSpanTicks()

FORCEINLINE int64 FCbValue::AsTimeSpanTicks ( ) const

Definition at line 197 of file CompactBinaryValue.h.

◆ AsUuid()

FORCEINLINE FGuid FCbValue::AsUuid ( ) const

Definition at line 182 of file CompactBinaryValue.h.

◆ GetData()

FORCEINLINE const void * FCbValue::GetData ( ) const
inline

Definition at line 65 of file CompactBinaryValue.h.

+ Here is the caller graph for this function:

◆ GetType()

FORCEINLINE ECbFieldType FCbValue::GetType ( ) const
inline

Definition at line 64 of file CompactBinaryValue.h.

+ Here is the caller graph for this function:

Member Data Documentation

◆ Data

const void* FCbValue::Data
private

Definition at line 68 of file CompactBinaryValue.h.

◆ Type

ECbFieldType FCbValue::Type
private

Definition at line 69 of file CompactBinaryValue.h.


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