UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
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
 

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.

Constructor & Destructor Documentation

◆ FCbValue()

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

Member Function Documentation

◆ AsArrayView()

FORCEINLINE FCbArrayView FCbValue::AsArrayView ( ) const

◆ AsAttachment()

FORCEINLINE FIoHash FCbValue::AsAttachment ( ) const
inline

◆ AsBinary()

FORCEINLINE FMemoryView FCbValue::AsBinary ( ) const

◆ AsBinaryAttachment()

FORCEINLINE FIoHash FCbValue::AsBinaryAttachment ( ) const
inline

◆ AsBool()

FORCEINLINE bool FCbValue::AsBool ( ) const

◆ AsCustomById()

FORCEINLINE FCbCustomById FCbValue::AsCustomById ( ) const

◆ AsCustomByName()

FORCEINLINE FCbCustomByName FCbValue::AsCustomByName ( ) const

◆ AsDateTimeTicks()

FORCEINLINE int64 FCbValue::AsDateTimeTicks ( ) const

◆ AsFloat32()

FORCEINLINE float FCbValue::AsFloat32 ( ) const

◆ AsFloat64()

FORCEINLINE double FCbValue::AsFloat64 ( ) const

◆ AsHash()

FORCEINLINE FIoHash FCbValue::AsHash ( ) const

◆ 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.

◆ AsIntegerNegative()

FORCEINLINE int64 FCbValue::AsIntegerNegative ( ) const

◆ AsIntegerPositive()

FORCEINLINE uint64 FCbValue::AsIntegerPositive ( ) const

◆ AsObjectAttachment()

FORCEINLINE FIoHash FCbValue::AsObjectAttachment ( ) const
inline

◆ AsObjectId()

FORCEINLINE FCbObjectId FCbValue::AsObjectId ( ) const

◆ AsObjectView()

FORCEINLINE FCbObjectView FCbValue::AsObjectView ( ) const

◆ 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.

◆ AsTimeSpanTicks()

FORCEINLINE int64 FCbValue::AsTimeSpanTicks ( ) const

◆ AsUuid()

FORCEINLINE FGuid FCbValue::AsUuid ( ) const

◆ GetData()

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

◆ GetType()

FORCEINLINE ECbFieldType FCbValue::GetType ( ) const
inline

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