Scippy

SoPlex

Sequential object-oriented simPlex

chrono_formatter< FormatContext, OutputIt, Rep, Period > Struct Template Reference

#include <chrono.h>

Public Types

using rep = conditional_t< std::is_integral< Rep >::value &&sizeof(Rep)< sizeof(int), unsigned, typename make_unsigned_or_unchanged< Rep >::type >
 
using seconds = std::chrono::duration< rep >
 
using milliseconds = std::chrono::duration< rep, std::milli >
 
using char_type = typename FormatContext::char_type
 

Public Member Functions

 chrono_formatter (FormatContext &ctx, OutputIt o, std::chrono::duration< Rep, Period > d)
 
bool handle_nan_inf ()
 
Rep hour () const
 
Rep hour12 () const
 
Rep minute () const
 
Rep second () const
 
std::tm time () const
 
void write_sign ()
 
void write (Rep value, int width)
 
void write_nan ()
 
void write_pinf ()
 
void write_ninf ()
 
void format_localized (const tm &time, const char *format)
 
void on_text (const char_type *begin, const char_type *end)
 
void on_abbr_weekday ()
 
void on_full_weekday ()
 
void on_dec0_weekday (numeric_system)
 
void on_dec1_weekday (numeric_system)
 
void on_abbr_month ()
 
void on_full_month ()
 
void on_datetime (numeric_system)
 
void on_loc_date (numeric_system)
 
void on_loc_time (numeric_system)
 
void on_us_date ()
 
void on_iso_date ()
 
void on_utc_offset ()
 
void on_tz_name ()
 
void on_24_hour (numeric_system ns)
 
void on_12_hour (numeric_system ns)
 
void on_minute (numeric_system ns)
 
void on_second (numeric_system ns)
 
void on_12_hour_time ()
 
void on_24_hour_time ()
 
void on_iso_time ()
 
void on_am_pm ()
 
void on_duration_value ()
 
void on_duration_unit ()
 

Public Attributes

FormatContext & context
 
OutputIt out
 
int precision
 
rep val
 
seconds s
 
bool negative
 

Detailed Description

template<typename FormatContext, typename OutputIt, typename Rep, typename Period>
struct internal::chrono_formatter< FormatContext, OutputIt, Rep, Period >

Definition at line 778 of file chrono.h.

Member Typedef Documentation

◆ char_type

using char_type = typename FormatContext::char_type

Definition at line 792 of file chrono.h.

◆ milliseconds

using milliseconds = std::chrono::duration<rep, std::milli>

Definition at line 789 of file chrono.h.

◆ rep

using rep = conditional_t<std::is_integral<Rep>::value && sizeof(Rep) < sizeof(int), unsigned, typename make_unsigned_or_unchanged<Rep>::type>

Definition at line 785 of file chrono.h.

◆ seconds

using seconds = std::chrono::duration<rep>

Definition at line 787 of file chrono.h.

Constructor & Destructor Documentation

◆ chrono_formatter()

chrono_formatter ( FormatContext &  ctx,
OutputIt  o,
std::chrono::duration< Rep, Period >  d 
)
explicit

Definition at line 794 of file chrono.h.

References internal::fmt_safe_duration_cast().

Member Function Documentation

◆ format_localized()

void format_localized ( const tm &  time,
const char *  format 
)

Definition at line 874 of file chrono.h.

References internal::copy(), and internal::isnan().

◆ handle_nan_inf()

bool handle_nan_inf ( )

Definition at line 818 of file chrono.h.

References internal::isfinite(), and internal::isnan().

◆ hour()

Rep hour ( ) const

Definition at line 835 of file chrono.h.

References internal::mod().

◆ hour12()

Rep hour12 ( ) const

Definition at line 837 of file chrono.h.

References internal::mod().

◆ minute()

Rep minute ( ) const

Definition at line 842 of file chrono.h.

References internal::mod().

◆ on_12_hour()

void on_12_hour ( numeric_system  ns)

Definition at line 913 of file chrono.h.

References internal::to_nonnegative_int(), and internal::write().

◆ on_12_hour_time()

void on_12_hour_time ( )

Definition at line 956 of file chrono.h.

◆ on_24_hour()

void on_24_hour ( numeric_system  ns)

Definition at line 904 of file chrono.h.

References internal::to_nonnegative_int(), and internal::write().

◆ on_24_hour_time()

void on_24_hour_time ( )

Definition at line 962 of file chrono.h.

References internal::write().

◆ on_abbr_month()

void on_abbr_month ( )

Definition at line 894 of file chrono.h.

◆ on_abbr_weekday()

void on_abbr_weekday ( )

Definition at line 890 of file chrono.h.

◆ on_am_pm()

void on_am_pm ( )

Definition at line 981 of file chrono.h.

◆ on_datetime()

void on_datetime ( numeric_system  )

Definition at line 896 of file chrono.h.

◆ on_dec0_weekday()

void on_dec0_weekday ( numeric_system  )

Definition at line 892 of file chrono.h.

◆ on_dec1_weekday()

void on_dec1_weekday ( numeric_system  )

Definition at line 893 of file chrono.h.

◆ on_duration_unit()

void on_duration_unit ( )

Definition at line 992 of file chrono.h.

◆ on_duration_value()

void on_duration_value ( )

Definition at line 986 of file chrono.h.

References internal::format_chrono_duration_value().

◆ on_full_month()

void on_full_month ( )

Definition at line 895 of file chrono.h.

◆ on_full_weekday()

void on_full_weekday ( )

Definition at line 891 of file chrono.h.

◆ on_iso_date()

void on_iso_date ( )

Definition at line 900 of file chrono.h.

◆ on_iso_time()

void on_iso_time ( )

Definition at line 974 of file chrono.h.

References internal::write().

◆ on_loc_date()

void on_loc_date ( numeric_system  )

Definition at line 897 of file chrono.h.

◆ on_loc_time()

void on_loc_time ( numeric_system  )

Definition at line 898 of file chrono.h.

◆ on_minute()

void on_minute ( numeric_system  ns)

Definition at line 922 of file chrono.h.

References internal::to_nonnegative_int(), and internal::write().

◆ on_second()

◆ on_text()

void on_text ( const char_type begin,
const char_type end 
)

Definition at line 885 of file chrono.h.

References internal::copy().

◆ on_tz_name()

void on_tz_name ( )

Definition at line 902 of file chrono.h.

◆ on_us_date()

void on_us_date ( )

Definition at line 899 of file chrono.h.

◆ on_utc_offset()

void on_utc_offset ( )

Definition at line 901 of file chrono.h.

◆ second()

Rep second ( ) const

Definition at line 843 of file chrono.h.

References internal::mod().

◆ time()

std::tm time ( ) const

Definition at line 845 of file chrono.h.

References internal::to_nonnegative_int().

◆ write()

void write ( Rep  value,
int  width 
)

◆ write_nan()

void write_nan ( )

Definition at line 870 of file chrono.h.

◆ write_ninf()

void write_ninf ( )

Definition at line 872 of file chrono.h.

◆ write_pinf()

void write_pinf ( )

Definition at line 871 of file chrono.h.

◆ write_sign()

void write_sign ( )

Definition at line 853 of file chrono.h.

Member Data Documentation

◆ context

FormatContext& context

Definition at line 779 of file chrono.h.

◆ negative

bool negative

Definition at line 790 of file chrono.h.

◆ out

OutputIt out

Definition at line 780 of file chrono.h.

◆ precision

int precision

◆ s

Definition at line 788 of file chrono.h.

◆ val

rep val

Definition at line 786 of file chrono.h.