Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TStringBuilderWithBuffer< CharType, BufferSize > Class Template Reference

#include <StringBuilder.h>

+ Inheritance diagram for TStringBuilderWithBuffer< CharType, BufferSize >:
+ Collaboration diagram for TStringBuilderWithBuffer< CharType, BufferSize >:

Public Member Functions

 TStringBuilderWithBuffer ()
 
- Public Member Functions inherited from TStringBuilderBase< CharType >
 TStringBuilderBase ()=default
 
 ~TStringBuilderBase ()
 
 TStringBuilderBase (const TStringBuilderBase &)=delete
 
 TStringBuilderBase (TStringBuilderBase &&)=delete
 
TStringBuilderBaseoperator= (const TStringBuilderBase &)=delete
 
TStringBuilderBaseoperator= (TStringBuilderBase &&)=delete
 
TStringBuilderBaseoperator= (ViewType Str)
 
TStringBuilderBaseoperator= (const CharType *Str)
 
 TStringBuilderBase (CharType *BufferPointer, int32 BufferCapacity)
 
int32 Len () const
 
CharType * GetData ()
 
const CharType * GetData () const
 
const CharType * ToString () const
 
ViewType ToView () const
 
const CharType * operator* () const
 
const CharType LastChar () const
 
SIZE_T GetAllocatedSize () const
 
void Reset ()
 
int32 AddUninitialized (int32 InCount)
 
void RemoveSuffix (int32 InCount)
 
template<typename OtherCharType , std::enable_if_t< TIsCharType< OtherCharType >::Value > * = nullptr>
BuilderTypeAppend (const OtherCharType *const String, const int32 Length)
 
template<typename CharRangeType >
auto Append (CharRangeType &&Range) -> decltype(Append(MakeStringView(Forward< CharRangeType >(Range)).GetData(), int32(0)))
 
template<typename AppendedCharType , std::enable_if_t< TIsCharType< AppendedCharType >::Value > * = nullptr>
BuilderTypeAppendChar (AppendedCharType Char)
 
template<typename AppendedCharType , std::enable_if_t< TIsCharType< AppendedCharType >::Value > * = nullptr>
BuilderTypeAppend (AppendedCharType Char)
 
BuilderTypeAppendAnsi (const FAnsiStringView String)
 
BuilderTypeAppendAnsi (const ANSICHAR *const String)
 
BuilderTypeAppendAnsi (const ANSICHAR *const String, const int32 Length)
 
void ReplaceAt (int32 Pos, int32 RemoveLen, ViewType Str)
 
void InsertAt (int32 Pos, ViewType Str)
 
void RemoveAt (int32 Pos, int32 RemoveLen)
 
void Prepend (ViewType Str)
 
template<typename RangeType , typename DelimiterType , std::enable_if_t< TCanAppendRange_V< RangeType && > &&TCanAppend_V< DelimiterType && > > * = nullptr>
BuilderTypeJoin (RangeType &&InRange, DelimiterType &&InDelimiter)
 
template<typename RangeType , typename DelimiterType , typename QuoteType , std::enable_if_t< TCanAppendRange_V< RangeType > &&TCanAppend_V< DelimiterType && > &&TCanAppend_V< QuoteType && > > * = nullptr>
BuilderTypeJoinQuoted (RangeType &&InRange, DelimiterType &&InDelimiter, QuoteType &&InQuote)
 
template<typename FmtType , typename... Types, std::enable_if_t< TIsArrayOrRefOfTypeByPredicate< FmtType, TIsCharEncodingCompatibleWithCharType >::Value > * = nullptr>
BuilderTypeAppendf (const FmtType &Fmt, Types... Args)
 
BuilderTypeAppendV (const CharType *Fmt, va_list Args)
 

Private Attributes

CharType StringBuffer [BufferSize]
 

Additional Inherited Members

- Public Types inherited from TStringBuilderBase< CharType >
using ElementType = CharType
 
using BuilderType = TStringBuilderBase<ElementType>
 
using ViewType = TStringView<ElementType>
 
- Static Public Attributes inherited from TStringBuilderBase< CharType >
template<typename AppendType >
static constexpr bool TCanAppend_V = std::is_same_v<BuilderType&, decltype(DeclVal<BuilderType&>() << DeclVal<AppendType>())>
 
template<typename RangeType >
static constexpr bool TCanAppendRange_V = TIsContiguousContainer<RangeType>::Value && TCanAppend_V<decltype(*::GetData(DeclVal<RangeType>()))>
 
- Protected Member Functions inherited from TStringBuilderBase< CharType >
void Initialize (CharType *InBase, int32 InCapacity)
 
void EnsureNulTerminated () const
 
void EnsureAdditionalCapacity (int32 RequiredAdditionalCapacity)
 
void Extend (SIZE_T ExtraCapacity)
 
voidAllocBuffer (SIZE_T CharCount)
 
void FreeBuffer (void *Buffer, SIZE_T CharCount)
 
- Protected Attributes inherited from TStringBuilderBase< CharType >
CharType * Base = EmptyBuffer
 
CharType * CurPos = Base
 
CharType * End = Base + 1
 
bool bIsDynamic = false
 
- Static Protected Attributes inherited from TStringBuilderBase< CharType >
static CharType EmptyBuffer [1] {}
 

Detailed Description

template<typename CharType, int32 BufferSize>
class TStringBuilderWithBuffer< CharType, BufferSize >

A string builder with inline storage.

Avoid using this type directly. Prefer the aliases in StringFwd.h like TStringBuilder<N>.

Definition at line 401 of file StringBuilder.h.

Constructor & Destructor Documentation

◆ TStringBuilderWithBuffer()

template<typename CharType , int32 BufferSize>
TStringBuilderWithBuffer< CharType, BufferSize >::TStringBuilderWithBuffer ( )
inline

Definition at line 404 of file StringBuilder.h.

Member Data Documentation

◆ StringBuffer

template<typename CharType , int32 BufferSize>
CharType TStringBuilderWithBuffer< CharType, BufferSize >::StringBuffer[BufferSize]
private

Definition at line 412 of file StringBuilder.h.


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