Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TCbBuffer< ViewType > Class Template Reference

#include <CompactBinary.h>

+ Inheritance diagram for TCbBuffer< ViewType >:
+ Collaboration 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
 

Private Attributes

FSharedBuffer Buffer
 

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.

Definition at line 1109 of file CompactBinary.h.

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.

Definition at line 1121 of file CompactBinary.h.

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

Definition at line 1132 of file CompactBinary.h.

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

Definition at line 1144 of file CompactBinary.h.

Member Function Documentation

◆ AsView()

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

Returns the value as a view.

Definition at line 1168 of file CompactBinary.h.

◆ begin()

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

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

Definition at line 1351 of file CompactBinary.h.

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

Definition at line 1341 of file CompactBinary.h.

◆ end()

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

Definition at line 1187 of file CompactBinary.h.

◆ GetOuterBuffer() [1/2]

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

Definition at line 1177 of file CompactBinary.h.

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

Definition at line 1176 of file CompactBinary.h.

◆ IsOwned()

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

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

Definition at line 1153 of file CompactBinary.h.

◆ MakeOwned()

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

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

Definition at line 1156 of file CompactBinary.h.

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

Definition at line 1270 of file CompactBinary.h.

◆ Reset()

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

Reset this to a default value and null buffer.

Definition at line 1150 of file CompactBinary.h.

Friends And Related Symbol Documentation

◆ TCbBuffer

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

Definition at line 1191 of file CompactBinary.h.

Member Data Documentation

◆ Buffer

template<typename ViewType >
FSharedBuffer TCbBuffer< ViewType >::Buffer
private

Definition at line 1193 of file CompactBinary.h.


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