UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TCbBuffer< ViewType > Class Template Reference

#include <CompactBinary.h>

+ Inheritance diagram for TCbBuffer< ViewType >:

Public Member Functions

 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)
 
void Reset ()
 
bool IsOwned () const
 
void MakeOwned ()
 
const ViewType & AsView () const
 
const FSharedBufferGetOuterBuffer () const &
 
FSharedBuffer GetOuterBuffer () &&
 
FCbField operator[] (FUtf8StringView Name) const
 
FCbFieldIterator CreateIterator () const
 
FCbFieldIterator begin () const
 
constexpr FCbIteratorSentinel end () const
 

Friends

template<typename OtherType >
class TCbBuffer
 

Detailed Description

template<typename ViewType>
class TCbBuffer< ViewType >

A wrapper that holds a reference to the buffer that contains its compact binary value.

Constructor & Destructor Documentation

◆ TCbBuffer() [1/4]

template<typename ViewType >
TCbBuffer< ViewType >::TCbBuffer ( )
default

Construct a default value.

◆ TCbBuffer() [2/4]

template<typename ViewType >
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.

◆ TCbBuffer() [3/4]

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

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

◆ TCbBuffer() [4/4]

template<typename ViewType >
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.

Member Function Documentation

◆ AsView()

template<typename ViewType >
const ViewType & TCbBuffer< ViewType >::AsView ( ) const
inline

Returns the value as a view.

◆ begin()

template<typename ViewType >
FCbFieldIterator TCbBuffer< ViewType >::begin ( ) const
inline

DO NOT USE DIRECTLY. These functions enable range-based for loop support.

◆ CreateIterator()

template<typename ViewType >
FCbFieldIterator TCbBuffer< ViewType >::CreateIterator ( ) const
inline

Create an iterator for the fields of an array or object, otherwise an empty iterator.

◆ end()

template<typename ViewType >
constexpr FCbIteratorSentinel TCbBuffer< ViewType >::end ( ) const
inlineconstexpr

◆ GetOuterBuffer() [1/2]

template<typename ViewType >
FSharedBuffer TCbBuffer< ViewType >::GetOuterBuffer ( ) &&
inline

◆ GetOuterBuffer() [2/2]

template<typename ViewType >
const FSharedBuffer & TCbBuffer< ViewType >::GetOuterBuffer ( ) const &
inline

Returns the outer buffer (if any) that contains this value.

The outer buffer might contain other data before and/or after this value. Use GetBuffer to request a buffer that exactly contains this value, or TryGetView for a contiguous view.

◆ IsOwned()

template<typename ViewType >
bool TCbBuffer< ViewType >::IsOwned ( ) const
inline

Whether this reference has ownership of the memory in its buffer.

◆ MakeOwned()

template<typename ViewType >
void TCbBuffer< ViewType >::MakeOwned ( )
inline

Clone the value, if necessary, to a buffer that this reference has ownership of.

◆ operator[]()

template<typename ViewType >
FCbField TCbBuffer< ViewType >::operator[] ( FUtf8StringView  Name) const
inline

Find a field of an object by case-sensitive name comparison, otherwise a field with no value.

◆ Reset()

template<typename ViewType >
void TCbBuffer< ViewType >::Reset ( )
inline

Reset this to a default value and null buffer.

Friends And Related Symbol Documentation

◆ TCbBuffer

template<typename ViewType >
template<typename OtherType >
friend class TCbBuffer
friend

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