XII Release 0.1.0
Loading...
Searching...
No Matches
xiiFormatStringImpl< ARGS > Class Template Reference
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
 Generates the formatted text. Make sure to only call this function once and only when the formatted string is really needed.
 
virtual const char * GetTextCStr (xiiStringBuilder &out_sString) const override
 Similar to GetText() but guaranteed to copy the string into the given string builder, and thus guaranteeing that the generated string is zero terminated.
 
- Public Member Functions inherited from xiiFormatString
XII_ALWAYS_INLINE xiiFormatString (const char *szString)
 
XII_ALWAYS_INLINE xiiFormatString (xiiStringView sString)
 
 xiiFormatString (const xiiStringBuilder &s)
 
bool IsEmpty () const
 
xiiStringView BuildFormattedText (xiiStringBuilder &ref_sStorage, xiiStringView *pArgs, xiiUInt32 uiNumArgs) const
 Helper function to build the formatted text with the given arguments.
 

Additional Inherited Members

- Protected Attributes inherited from xiiFormatString
xiiStringView m_sString
 

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: