WPILibC++ 2027.0.0-alpha-2
Loading...
Searching...
No Matches
detail::duration_formatter< Char, Rep, Period > Struct Template Reference

#include <fmt/chrono.h>

Public Types

using iterator = basic_appender<Char>
 
using rep
 
using seconds = std::chrono::duration<rep>
 
using milliseconds = std::chrono::duration<rep, std::milli>
 
using tm_writer_type = tm_writer<iterator, Char>
 

Public Member Functions

 duration_formatter (iterator o, std::chrono::duration< Rep, Period > d, locale_ref loc)
 
auto handle_nan_inf () -> bool
 
auto days () const -> Rep
 
auto hour () const -> Rep
 
auto hour12 () const -> Rep
 
auto minute () const -> Rep
 
auto second () const -> Rep
 
auto time () const -> std::tm
 
void write_sign ()
 
void write (Rep value, int width, pad_type pad=pad_type::zero)
 
void write_nan ()
 
template<typename Callback , typename... Args>
void format_tm (const tm &time, Callback cb, Args... args)
 
void on_text (const Char *begin, const Char *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 (numeric_system)
 
void on_tz_name ()
 
void on_year (numeric_system, pad_type)
 
void on_short_year (numeric_system)
 
void on_offset_year ()
 
void on_century (numeric_system)
 
void on_iso_week_based_year ()
 
void on_iso_week_based_short_year ()
 
void on_dec_month (numeric_system, pad_type)
 
void on_dec0_week_of_year (numeric_system, pad_type)
 
void on_dec1_week_of_year (numeric_system, pad_type)
 
void on_iso_week_of_year (numeric_system, pad_type)
 
void on_day_of_month (numeric_system, pad_type)
 
void on_day_of_year (pad_type)
 
void on_24_hour (numeric_system ns, pad_type pad)
 
void on_12_hour (numeric_system ns, pad_type pad)
 
void on_minute (numeric_system ns, pad_type pad)
 
void on_second (numeric_system ns, pad_type pad)
 
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

iterator out
 
rep val
 
int precision
 
locale_ref locale
 
bool localized = false
 
seconds s
 
bool negative
 

Member Typedef Documentation

◆ iterator

template<typename Char , typename Rep , typename Period >
using detail::duration_formatter< Char, Rep, Period >::iterator = basic_appender<Char>

◆ milliseconds

template<typename Char , typename Rep , typename Period >
using detail::duration_formatter< Char, Rep, Period >::milliseconds = std::chrono::duration<rep, std::milli>

◆ rep

template<typename Char , typename Rep , typename Period >
using detail::duration_formatter< Char, Rep, Period >::rep
Initial value:
conditional_t<std::is_integral<Rep>::value && sizeof(Rep) < sizeof(int),
T type
Definition chrono.h:1605
typename std::conditional< B, T, F >::type conditional_t
Definition base.h:314

◆ seconds

template<typename Char , typename Rep , typename Period >
using detail::duration_formatter< Char, Rep, Period >::seconds = std::chrono::duration<rep>

◆ tm_writer_type

template<typename Char , typename Rep , typename Period >
using detail::duration_formatter< Char, Rep, Period >::tm_writer_type = tm_writer<iterator, Char>

Constructor & Destructor Documentation

◆ duration_formatter()

template<typename Char , typename Rep , typename Period >
detail::duration_formatter< Char, Rep, Period >::duration_formatter ( iterator o,
std::chrono::duration< Rep, Period > d,
locale_ref loc )
inline

Member Function Documentation

◆ days()

template<typename Char , typename Rep , typename Period >
auto detail::duration_formatter< Char, Rep, Period >::days ( ) const -> Rep
inline

◆ format_tm()

template<typename Char , typename Rep , typename Period >
template<typename Callback , typename... Args>
void detail::duration_formatter< Char, Rep, Period >::format_tm ( const tm & time,
Callback cb,
Args... args )
inline

◆ handle_nan_inf()

template<typename Char , typename Rep , typename Period >
auto detail::duration_formatter< Char, Rep, Period >::handle_nan_inf ( ) -> bool
inline

◆ hour()

template<typename Char , typename Rep , typename Period >
auto detail::duration_formatter< Char, Rep, Period >::hour ( ) const -> Rep
inline

◆ hour12()

template<typename Char , typename Rep , typename Period >
auto detail::duration_formatter< Char, Rep, Period >::hour12 ( ) const -> Rep
inline

◆ minute()

template<typename Char , typename Rep , typename Period >
auto detail::duration_formatter< Char, Rep, Period >::minute ( ) const -> Rep
inline

◆ on_12_hour()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_12_hour ( numeric_system ns,
pad_type pad )
inline

◆ on_12_hour_time()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_12_hour_time ( )
inline

◆ on_24_hour()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_24_hour ( numeric_system ns,
pad_type pad )
inline

◆ on_24_hour_time()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_24_hour_time ( )
inline

◆ on_abbr_month()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_abbr_month ( )
inline

◆ on_abbr_weekday()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_abbr_weekday ( )
inline

◆ on_am_pm()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_am_pm ( )
inline

◆ on_century()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_century ( numeric_system )
inline

◆ on_datetime()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_datetime ( numeric_system )
inline

◆ on_day_of_month()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_day_of_month ( numeric_system ,
pad_type  )
inline

◆ on_day_of_year()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_day_of_year ( pad_type )
inline

◆ on_dec0_week_of_year()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_dec0_week_of_year ( numeric_system ,
pad_type  )
inline

◆ on_dec0_weekday()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_dec0_weekday ( numeric_system )
inline

◆ on_dec1_week_of_year()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_dec1_week_of_year ( numeric_system ,
pad_type  )
inline

◆ on_dec1_weekday()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_dec1_weekday ( numeric_system )
inline

◆ on_dec_month()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_dec_month ( numeric_system ,
pad_type  )
inline

◆ on_duration_unit()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_duration_unit ( )
inline

◆ on_duration_value()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_duration_value ( )
inline

◆ on_full_month()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_full_month ( )
inline

◆ on_full_weekday()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_full_weekday ( )
inline

◆ on_iso_date()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_iso_date ( )
inline

◆ on_iso_time()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_iso_time ( )
inline

◆ on_iso_week_based_short_year()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_iso_week_based_short_year ( )
inline

◆ on_iso_week_based_year()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_iso_week_based_year ( )
inline

◆ on_iso_week_of_year()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_iso_week_of_year ( numeric_system ,
pad_type  )
inline

◆ on_loc_date()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_loc_date ( numeric_system )
inline

◆ on_loc_time()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_loc_time ( numeric_system )
inline

◆ on_minute()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_minute ( numeric_system ns,
pad_type pad )
inline

◆ on_offset_year()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_offset_year ( )
inline

◆ on_second()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_second ( numeric_system ns,
pad_type pad )
inline

◆ on_short_year()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_short_year ( numeric_system )
inline

◆ on_text()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_text ( const Char * begin,
const Char * end )
inline

◆ on_tz_name()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_tz_name ( )
inline

◆ on_us_date()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_us_date ( )
inline

◆ on_utc_offset()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_utc_offset ( numeric_system )
inline

◆ on_year()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::on_year ( numeric_system ,
pad_type  )
inline

◆ second()

template<typename Char , typename Rep , typename Period >
auto detail::duration_formatter< Char, Rep, Period >::second ( ) const -> Rep
inline

◆ time()

template<typename Char , typename Rep , typename Period >
auto detail::duration_formatter< Char, Rep, Period >::time ( ) const -> std::tm
inline

◆ write()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::write ( Rep value,
int width,
pad_type pad = pad_type::zero )
inline

◆ write_nan()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::write_nan ( )
inline

◆ write_sign()

template<typename Char , typename Rep , typename Period >
void detail::duration_formatter< Char, Rep, Period >::write_sign ( )
inline

Member Data Documentation

◆ locale

template<typename Char , typename Rep , typename Period >
locale_ref detail::duration_formatter< Char, Rep, Period >::locale

◆ localized

template<typename Char , typename Rep , typename Period >
bool detail::duration_formatter< Char, Rep, Period >::localized = false

◆ negative

template<typename Char , typename Rep , typename Period >
bool detail::duration_formatter< Char, Rep, Period >::negative

◆ out

template<typename Char , typename Rep , typename Period >
iterator detail::duration_formatter< Char, Rep, Period >::out

◆ precision

template<typename Char , typename Rep , typename Period >
int detail::duration_formatter< Char, Rep, Period >::precision

◆ s

template<typename Char , typename Rep , typename Period >
seconds detail::duration_formatter< Char, Rep, Period >::s

◆ val

template<typename Char , typename Rep , typename Period >
rep detail::duration_formatter< Char, Rep, Period >::val

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