Scippy

SoPlex

Sequential object-oriented simPlex

basic_writer< Range > Class Template Reference

#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

using char_type = typename Range::value_type

Definition at line 1379 of file format.h.

◆ format_specs

Definition at line 1381 of file format.h.

◆ iterator

using iterator = typename Range::iterator

Definition at line 1380 of file format.h.

Constructor & Destructor Documentation

◆ basic_writer()

basic_writer ( Range  out,
locale_ref  loc = locale_ref() 
)
explicit

Definition at line 1623 of file format.h.

Member Function Documentation

◆ out()

iterator out ( ) const

◆ reserve()

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]

◆ write() [2/13]

void write ( long  value)

Definition at line 1655 of file format.h.

◆ write() [3/13]

void write ( long long  value)

Definition at line 1656 of file format.h.

◆ write() [4/13]

void write ( unsigned  value)

Definition at line 1658 of file format.h.

◆ write() [5/13]

void write ( unsigned long  value)

Definition at line 1659 of file format.h.

◆ write() [6/13]

void write ( unsigned long long  value)

Definition at line 1660 of file format.h.

References internal::write().

◆ write() [7/13]

◆ write() [8/13]

void write ( char  value)

Definition at line 1726 of file format.h.

References internal::reserve().

◆ write() [9/13]

void write ( Char  value)

Definition at line 1732 of file format.h.

References internal::reserve().

◆ write() [10/13]

◆ write() [11/13]

◆ write() [12/13]

void write ( const Char *  s,
std::size_t  size,
const format_specs specs 
)

Definition at line 1748 of file format.h.

◆ write() [13/13]

◆ write_decimal()

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]

void write_int ( value,
const Spec &  spec 
)

Definition at line 1668 of file format.h.

References internal::handle_int_type_spec().

◆ write_padded()

◆ write_pointer()

void write_pointer ( UIntPtr  value,
const format_specs specs 
)

Member Data Documentation

◆ locale_

locale_ref locale_
private

Definition at line 1385 of file format.h.

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

◆ out_

iterator out_
private

Definition at line 1384 of file format.h.