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

#include <format.h>

Classes

struct  int_writer
 
struct  padded_int_writer
 
struct  pointer_writer
 
struct  str_writer
 

Public Types

using char_type = typename Range::value_type
 
using iterator = typename Range::iterator
 
using format_specs = basic_format_specs<char_type>
 

Public Member Functions

 basic_writer (Range out, locale_ref loc=locale_ref())
 
iterator out () const
 
template<typename F >
void write_padded (const format_specs &specs, F &&f)
 
void write (int value)
 
void write (long value)
 
void write (long long value)
 
void write (unsigned value)
 
void write (unsigned long value)
 
void write (unsigned long long value)
 
template<typename T , typename Spec >
void write_int (T value, const Spec &spec)
 
template<typename T , FMT_ENABLE_IF(std::is_floating_point< T >::value) >
void write (T value, format_specs specs={})
 
void write (char value)
 
template<typename Char , FMT_ENABLE_IF(std::is_same< Char, char_type >::value) >
void write (Char value)
 
void write (string_view value)
 
void write (wstring_view value)
 
template<typename Char >
void write (const Char *s, std::size_t size, const format_specs &specs)
 
template<typename Char >
void write (basic_string_view< Char > s, const format_specs &specs={})
 
template<typename UIntPtr >
void write_pointer (UIntPtr value, const format_specs *specs)
 

Private Member Functions

auto reserve (std::size_t n) -> decltype(internal::reserve(out_, n))
 
template<typename F >
void write_int (int num_digits, string_view prefix, format_specs specs, F f)
 
template<typename Int >
void write_decimal (Int value)
 

Private Attributes

iterator out_
 
locale_ref locale_
 

Detailed Description

template<typename Range>
class internal::basic_writer< Range >

Definition at line 1377 of file format.h.

Member Typedef Documentation

◆ char_type

template<typename Range >
using char_type = typename Range::value_type

Definition at line 1379 of file format.h.

◆ format_specs

template<typename Range >
using format_specs = basic_format_specs<char_type>

Definition at line 1381 of file format.h.

◆ iterator

template<typename Range >
using iterator = typename Range::iterator

Definition at line 1380 of file format.h.

Constructor & Destructor Documentation

◆ basic_writer()

template<typename Range >
basic_writer ( Range out,
locale_ref loc = locale_ref() )
explicit

Definition at line 1623 of file format.h.

Member Function Documentation

◆ out()

template<typename Range >
iterator out ( ) const

Definition at line 1626 of file format.h.

Referenced by arg_formatter_base< Range, ErrorHandler >::out().

◆ reserve()

template<typename Range >
auto reserve ( std::size_t n) -> decltype(internal::reserve(out_, n))
private

Definition at line 1389 of file format.h.

References internal::reserve().

◆ write() [1/13]

template<typename Range >
template<typename Char >
void write ( basic_string_view< Char > s,
const format_specs & specs = {} )

Definition at line 1753 of file format.h.

◆ write() [2/13]

template<typename Range >
void write ( char value)

Definition at line 1726 of file format.h.

References internal::reserve().

◆ write() [3/13]

template<typename Range >
template<typename Char , FMT_ENABLE_IF(std::is_same< Char, char_type >::value) >
void write ( Char value)

Definition at line 1732 of file format.h.

References internal::reserve().

◆ write() [4/13]

template<typename Range >
template<typename Char >
void write ( const Char * s,
std::size_t size,
const format_specs & specs )

Definition at line 1748 of file format.h.

◆ write() [5/13]

◆ write() [6/13]

template<typename Range >
void write ( long long value)

Definition at line 1656 of file format.h.

◆ write() [7/13]

template<typename Range >
void write ( long value)

Definition at line 1655 of file format.h.

◆ write() [8/13]

template<typename Range >
void write ( string_view value)

Definition at line 1737 of file format.h.

References internal::reserve().

◆ write() [9/13]

template<typename Range >
template<typename T , FMT_ENABLE_IF(std::is_floating_point< T >::value) >
void write ( T value,
format_specs specs = {} )

Definition at line 1673 of file format.h.

◆ write() [10/13]

template<typename Range >
void write ( unsigned long long value)

Definition at line 1660 of file format.h.

◆ write() [11/13]

template<typename Range >
void write ( unsigned long value)

Definition at line 1659 of file format.h.

◆ write() [12/13]

template<typename Range >
void write ( unsigned value)

Definition at line 1658 of file format.h.

◆ write() [13/13]

template<typename Range >
void write ( wstring_view value)

Definition at line 1741 of file format.h.

References internal::reserve().

◆ write_decimal()

template<typename Range >
template<typename Int >
void write_decimal ( Int value)
private

Definition at line 1435 of file format.h.

References internal::count_digits(), internal::is_negative(), and internal::reserve().

◆ write_int() [1/2]

◆ write_int() [2/2]

template<typename Range >
template<typename T , typename Spec >
void write_int ( T value,
const Spec & spec )

Definition at line 1668 of file format.h.

References internal::handle_int_type_spec().

◆ write_padded()

template<typename Range >
template<typename F >
void write_padded ( const format_specs & specs,
F && f )

◆ write_pointer()

template<typename Range >
template<typename UIntPtr >
void write_pointer ( UIntPtr value,
const format_specs * specs )

Member Data Documentation

◆ locale_

template<typename Range >
locale_ref locale_
private

Definition at line 1385 of file format.h.

Referenced by basic_writer< Range >::int_writer< Int, Specs >::on_num().

◆ out_

template<typename Range >
iterator out_
private

Definition at line 1384 of file format.h.