Plasma Engine  2.0
Loading...
Searching...
No Matches
plFormatStringImpl< ARGS > Class Template Reference
Inheritance diagram for plFormatStringImpl< ARGS >:

Public Member Functions

 plFormatStringImpl (plStringView sFormat, ARGS &&... args)
 
 plFormatStringImpl (const char *szFormat, ARGS &&... args)
 
virtual plStringView GetText (plStringBuilder &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 (plStringBuilder &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 plFormatString
PL_ALWAYS_INLINE plFormatString (const char *szString)
 
PL_ALWAYS_INLINE plFormatString (plStringView sString)
 
 plFormatString (const plStringBuilder &s)
 
bool IsEmpty () const
 
plStringView BuildFormattedText (plStringBuilder &ref_sStorage, plStringView *pArgs, plUInt32 uiNumArgs) const
 Helper function to build the formatted text with the given arguments.
 

Additional Inherited Members

- Protected Attributes inherited from plFormatString
plStringView m_sString
 

Member Function Documentation

◆ GetText()

template<typename... ARGS>
virtual plStringView plFormatStringImpl< ARGS >::GetText ( plStringBuilder & 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 an plStringBuilder as storage, ie. writes the formatted text into it. Additionally it returns a const char* to that string builder data for convenience.

Reimplemented from plFormatString.

◆ GetTextCStr()

template<typename... ARGS>
virtual const char * plFormatStringImpl< ARGS >::GetTextCStr ( plStringBuilder & 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 plFormatString.


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