SoPlex Documentation
Loading...
Searching...
No Matches

#include <printf.h>

Public Types

using char_type = Char
 
using format_arg = basic_format_arg<basic_printf_context>
 
template<typename T >
using formatter_type = printf_formatter<T>
 

Public Member Functions

 basic_printf_context (OutputIt out, basic_string_view< char_type > format_str, basic_format_args< basic_printf_context > args)
 
OutputIt out ()
 
void advance_to (OutputIt it)
 
format_arg arg (int id) const
 
basic_format_parse_context< Char > & parse_context ()
 
FMT_CONSTEXPR void on_error (const char *message)
 
template<typename ArgFormatter = printf_arg_formatter<buffer_range<Char>>>
OutputIt format ()
 

Private Types

using format_specs = basic_format_specs<char_type>
 

Private Member Functions

format_arg get_arg (int arg_index=-1)
 
int parse_header (const Char *&it, const Char *end, format_specs &specs)
 

Static Private Member Functions

static void parse_flags (format_specs &specs, const Char *&it, const Char *end)
 

Private Attributes

OutputIt out_
 
basic_format_args< basic_printf_contextargs_
 
basic_format_parse_context< Char > parse_ctx_
 

Detailed Description

template<typename OutputIt, typename Char>
class basic_printf_context< OutputIt, Char >

This template formats data and writes the output to a writer.

Definition at line 319 of file printf.h.

Member Typedef Documentation

◆ char_type

template<typename OutputIt , typename Char >
using char_type = Char

The character type for the output.

Definition at line 322 of file printf.h.

◆ format_arg

template<typename OutputIt , typename Char >
using format_arg = basic_format_arg<basic_printf_context>

Definition at line 323 of file printf.h.

◆ format_specs

template<typename OutputIt , typename Char >
using format_specs = basic_format_specs<char_type>
private

Definition at line 327 of file printf.h.

◆ formatter_type

template<typename OutputIt , typename Char >
template<typename T >
using formatter_type = printf_formatter<T>

Definition at line 324 of file printf.h.

Constructor & Destructor Documentation

◆ basic_printf_context()

template<typename OutputIt , typename Char >
basic_printf_context ( OutputIt out,
basic_string_view< char_type > format_str,
basic_format_args< basic_printf_context< OutputIt, Char > > args )

\rst Constructs a printf_context object. References to the arguments and the writer are stored in the context object so make sure they have appropriate lifetimes. \endrst

Definition at line 351 of file printf.h.

Member Function Documentation

◆ advance_to()

template<typename OutputIt , typename Char >
void advance_to ( OutputIt it)

Definition at line 356 of file printf.h.

References basic_printf_context< OutputIt, Char >::out_.

◆ arg()

template<typename OutputIt , typename Char >
format_arg arg ( int id) const

◆ format()

template<typename OutputIt , typename Char >
template<typename ArgFormatter >
OutputIt format ( )

◆ get_arg()

template<typename OutputIt , typename Char >
basic_printf_context< OutputIt, Char >::format_arg get_arg ( int arg_index = -1)
private

Definition at line 400 of file printf.h.

References internal::get_arg().

◆ on_error()

template<typename OutputIt , typename Char >
FMT_CONSTEXPR void on_error ( const char * message)

Definition at line 362 of file printf.h.

References basic_printf_context< OutputIt, Char >::parse_ctx_.

◆ out()

template<typename OutputIt , typename Char >
OutputIt out ( )

Definition at line 355 of file printf.h.

References basic_printf_context< OutputIt, Char >::out_.

◆ parse_context()

template<typename OutputIt , typename Char >
basic_format_parse_context< Char > & parse_context ( )

◆ parse_flags()

template<typename OutputIt , typename Char >
void parse_flags ( format_specs & specs,
const Char *& it,
const Char * end )
staticprivate

◆ parse_header()

template<typename OutputIt , typename Char >
int parse_header ( const Char *& it,
const Char * end,
format_specs & specs )
private

Member Data Documentation

◆ args_

template<typename OutputIt , typename Char >
basic_format_args<basic_printf_context> args_
private

Definition at line 330 of file printf.h.

Referenced by basic_printf_context< OutputIt, Char >::arg().

◆ out_

template<typename OutputIt , typename Char >
OutputIt out_
private

◆ parse_ctx_

template<typename OutputIt , typename Char >
basic_format_parse_context<Char> parse_ctx_
private