XII Release 0.1.0
Loading...
Searching...
No Matches
xiiFormatStringImpl< ARGS > Class Template Reference

Copyright (c) Theophilus Eriata. All Rights Reserved. More...

#include <FormatStringImpl.h>

Inheritance diagram for xiiFormatStringImpl< ARGS >:
[legend]

Public Member Functions

 xiiFormatStringImpl (xiiStringView sFormat, ARGS &&... args)
 xiiFormatStringImpl (const char *szFormat, ARGS &&... args)
virtual xiiStringView GetText (xiiStringBuilder &ref_sStorage) const override
virtual const char * GetTextCStr (xiiStringBuilder &out_sString) const override
Public Member Functions inherited from xiiFormatString
XII_ALWAYS_INLINE xiiFormatString (const char *szString)
XII_ALWAYS_INLINE xiiFormatString (xiiStringView sString)
 xiiFormatString (const xiiStringBuilder &s)
 Copyright (c) Theophilus Eriata. All Rights Reserved.
bool IsEmpty () const
xiiStringView BuildFormattedText (xiiStringBuilder &ref_sStorage, xiiStringView *pArgs, xiiUInt32 uiNumArgs) const

Additional Inherited Members

Protected Attributes inherited from xiiFormatString
xiiStringView m_sString

Detailed Description

template<typename... ARGS>
class xiiFormatStringImpl< ARGS >

Copyright (c) Theophilus Eriata. All Rights Reserved.

Member Function Documentation

◆ GetText()

template<typename... ARGS>
virtual xiiStringView xiiFormatStringImpl< ARGS >::GetText ( xiiStringBuilder & ref_sStorage) const
inlineoverridevirtual

Generates the formatted text. Make sure to only call this function once and only when the formatted string is really needed.

Requires a xiiStringBuilder as storage, ie. writes the formatted text into it. Additionally it returns a xiiStringView to that string builder data for convenience.

Reimplemented from xiiFormatString.

◆ GetTextCStr()

template<typename... ARGS>
virtual const char * xiiFormatStringImpl< ARGS >::GetTextCStr ( xiiStringBuilder & out_sString) const
inlineoverridevirtual

Similar to GetText() but guaranteed to copy the string into the given string builder, and thus guaranteeing that the generated string is zero terminated.

Reimplemented from xiiFormatString.


The documentation for this class was generated from the following file:
  • /home/runner/work/XII/XII/Source/Engine/Foundation/Strings/Implementation/FormatStringImpl.h