PLCnext API Documentation  22.9.0.33
Public Types | Static Public Member Functions | List of all members
Arp::BasicFormatter< C, A > Class Template Reference

This class encapsulates formatting operations which are based on the open source library libfmt formerly known as cppformat. More...

#include <BasicFormatter.hxx>

Public Types

using CharType = C
 The char type provided as template argument.
 
using StringType = BasicString< C, A >
 The string type determined by template argument.
 
using ExceptionHandler = std::function< void(const char *, const char *)>
 The exception handler signature.
 

Static Public Member Functions

template<typename... Args>
static StringType FormatCommon (ExceptionHandler exceptionHandler, const StringType &format, const Args &... args)
 Uses common CLR syntax (.Net) for the placeholders in the format string like '{0}'. More...
 
template<typename... Args>
static StringType FormatCommon (ExceptionHandler exceptionHandler, const CharType *format, const Args &... args)
 Uses common CLR syntax (.Net) for the placeholders in the format string like '{0}'. More...
 
template<typename... Args>
static StringType FormatPrintf (ExceptionHandler exceptionHandler, const StringType &format, const Args &... args)
 Uses Ansi-C printf syntax for the placeholders in the format string like 's'. More...
 
template<typename... Args>
static StringType FormatPrintf (ExceptionHandler exceptionHandler, const CharType *format, const Args &... args)
 Uses Ansi-C printf syntax for the placeholders in the format string like 's'. More...
 

Detailed Description

template<typename C, typename A = std::allocator<C>>
class Arp::BasicFormatter< C, A >

This class encapsulates formatting operations which are based on the open source library libfmt formerly known as cppformat.

Template Parameters
CThe char type
AThe characters allocator type

Member Function Documentation

◆ FormatCommon() [1/2]

template<typename C , typename A >
template<typename... Args>
BasicFormatter< C, A >::StringType Arp::BasicFormatter< C, A >::FormatCommon ( ExceptionHandler  exceptionHandler,
const CharType format,
const Args &...  args 
)
inlinestatic

Uses common CLR syntax (.Net) for the placeholders in the format string like '{0}'.

◆ FormatCommon() [2/2]

template<typename C , typename A >
template<typename... Args>
BasicFormatter< C, A >::StringType Arp::BasicFormatter< C, A >::FormatCommon ( ExceptionHandler  exceptionHandler,
const StringType format,
const Args &...  args 
)
inlinestatic

Uses common CLR syntax (.Net) for the placeholders in the format string like '{0}'.

◆ FormatPrintf() [1/2]

template<typename C , typename A >
template<typename... Args>
BasicFormatter< C, A >::StringType Arp::BasicFormatter< C, A >::FormatPrintf ( ExceptionHandler  exceptionHandler,
const CharType format,
const Args &...  args 
)
inlinestatic

Uses Ansi-C printf syntax for the placeholders in the format string like 's'.

◆ FormatPrintf() [2/2]

template<typename C , typename A >
template<typename... Args>
BasicFormatter< C, A >::StringType Arp::BasicFormatter< C, A >::FormatPrintf ( ExceptionHandler  exceptionHandler,
const StringType format,
const Args &...  args 
)
inlinestatic

Uses Ansi-C printf syntax for the placeholders in the format string like 's'.


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