Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
detail::tm_writer< OutputIt, Char, Duration > Class Template Reference

#include <chrono.h>

Public Member Functions

void on_12_hour (numeric_system ns, pad_type pad)
 
void on_12_hour_time ()
 
void on_24_hour (numeric_system ns, pad_type pad)
 
void on_24_hour_time ()
 
void on_abbr_month ()
 
void on_abbr_weekday ()
 
void on_am_pm ()
 
void on_century (numeric_system ns)
 
void on_datetime (numeric_system ns)
 
void on_day_of_month (numeric_system ns)
 
void on_day_of_month_space (numeric_system ns)
 
void on_day_of_year ()
 
void on_dec0_week_of_year (numeric_system ns)
 
void on_dec0_weekday (numeric_system ns)
 
void on_dec1_week_of_year (numeric_system ns)
 
void on_dec1_weekday (numeric_system ns)
 
void on_dec_month (numeric_system ns)
 
void on_duration_unit ()
 
void on_duration_value ()
 
void on_full_month ()
 
void on_full_weekday ()
 
void on_iso_date ()
 
void on_iso_time ()
 
void on_iso_week_based_short_year ()
 
void on_iso_week_based_year ()
 
void on_iso_week_of_year (numeric_system ns)
 
void on_loc_date (numeric_system ns)
 
void on_loc_time (numeric_system ns)
 
void on_minute (numeric_system ns, pad_type pad)
 
void on_offset_year ()
 
void on_second (numeric_system ns, pad_type pad)
 
void on_short_year (numeric_system ns)
 
FMT_CONSTEXPR void on_text (const Char *begin, const Char *end)
 
void on_tz_name ()
 
void on_us_date ()
 
void on_utc_offset (numeric_system ns)
 
void on_year (numeric_system ns)
 
auto out () const -> OutputIt
 
 tm_writer (const std::locale &loc, OutputIt out, const std::tm &tm, const Duration *subsecs=nullptr)
 

Private Member Functions

void format_localized (char format, char modifier=0)
 
template<typename T , FMT_ENABLE_IF(!has_member_data_tm_zone< T >::value) >
void format_tz_name_impl (const T &)
 
template<typename T , FMT_ENABLE_IF(has_member_data_tm_zone< T >::value) >
void format_tz_name_impl (const T &tm)
 
template<typename T , FMT_ENABLE_IF(has_member_data_tm_gmtoff< T >::value) >
void format_utc_offset_impl (const T &tm, numeric_system ns)
 
template<typename T , FMT_ENABLE_IF(!has_member_data_tm_gmtoff< T >::value) >
void format_utc_offset_impl (const T &tm, numeric_system ns)
 
auto iso_week_num (int tm_yday, int tm_wday) const noexcept -> int
 
auto iso_year_weeks (long long curr_year) const noexcept -> int
 
auto split_year_lower (long long year) const noexcept -> int
 
auto tm_hour () const noexcept -> int
 
auto tm_hour12 () const noexcept -> int
 
auto tm_iso_week_of_year () const noexcept -> int
 
auto tm_iso_week_year () const noexcept -> long long
 
auto tm_mday () const noexcept -> int
 
auto tm_min () const noexcept -> int
 
auto tm_mon () const noexcept -> int
 
auto tm_sec () const noexcept -> int
 
auto tm_wday () const noexcept -> int
 
auto tm_yday () const noexcept -> int
 
auto tm_year () const noexcept -> long long
 
void write1 (int value)
 
void write2 (int value)
 
void write2 (int value, pad_type pad)
 
void write_utc_offset (long offset, numeric_system ns)
 
void write_year (long long year)
 
void write_year_extended (long long year)
 

Private Attributes

const bool is_classic_
 
const std::locale & loc_
 
OutputIt out_
 
const Duration * subsecs_
 
const std::tm & tm_
 

Static Private Attributes

static constexpr int days_per_week = 7
 

Detailed Description

template<typename OutputIt, typename Char, typename Duration = std::chrono::seconds>
class detail::tm_writer< OutputIt, Char, Duration >

Definition at line 1168 of file chrono.h.

Constructor & Destructor Documentation

◆ tm_writer()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
detail::tm_writer< OutputIt, Char, Duration >::tm_writer ( const std::locale &  loc,
OutputIt  out,
const std::tm &  tm,
const Duration *  subsecs = nullptr 
)
inline

Definition at line 1356 of file chrono.h.

Member Function Documentation

◆ format_localized()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::format_localized ( char  format,
char  modifier = 0 
)
inlineprivate

Definition at line 1351 of file chrono.h.

◆ format_tz_name_impl() [1/2]

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
template<typename T , FMT_ENABLE_IF(!has_member_data_tm_zone< T >::value) >
void detail::tm_writer< OutputIt, Char, Duration >::format_tz_name_impl ( const T &  )
inlineprivate

Definition at line 1347 of file chrono.h.

◆ format_tz_name_impl() [2/2]

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
template<typename T , FMT_ENABLE_IF(has_member_data_tm_zone< T >::value) >
void detail::tm_writer< OutputIt, Char, Duration >::format_tz_name_impl ( const T &  tm)
inlineprivate

Definition at line 1340 of file chrono.h.

◆ format_utc_offset_impl() [1/2]

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
template<typename T , FMT_ENABLE_IF(has_member_data_tm_gmtoff< T >::value) >
void detail::tm_writer< OutputIt, Char, Duration >::format_utc_offset_impl ( const T &  tm,
numeric_system  ns 
)
inlineprivate

Definition at line 1309 of file chrono.h.

◆ format_utc_offset_impl() [2/2]

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
template<typename T , FMT_ENABLE_IF(!has_member_data_tm_gmtoff< T >::value) >
void detail::tm_writer< OutputIt, Char, Duration >::format_utc_offset_impl ( const T &  tm,
numeric_system  ns 
)
inlineprivate

Definition at line 1313 of file chrono.h.

◆ iso_week_num()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::iso_week_num ( int  tm_yday,
int  tm_wday 
) const -> int
inlineprivatenoexcept

Definition at line 1235 of file chrono.h.

◆ iso_year_weeks()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::iso_year_weeks ( long long  curr_year) const -> int
inlineprivatenoexcept

Definition at line 1225 of file chrono.h.

◆ on_12_hour()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_12_hour ( numeric_system  ns,
pad_type  pad 
)
inline

Definition at line 1552 of file chrono.h.

◆ on_12_hour_time()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_12_hour_time ( )
inline

Definition at line 1584 of file chrono.h.

◆ on_24_hour()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_24_hour ( numeric_system  ns,
pad_type  pad 
)
inline

Definition at line 1547 of file chrono.h.

◆ on_24_hour_time()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_24_hour_time ( )
inline

Definition at line 1596 of file chrono.h.

◆ on_abbr_month()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_abbr_month ( )
inline

Definition at line 1395 of file chrono.h.

◆ on_abbr_weekday()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_abbr_weekday ( )
inline

Definition at line 1370 of file chrono.h.

◆ on_am_pm()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_am_pm ( )
inline

Definition at line 1607 of file chrono.h.

◆ on_century()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_century ( numeric_system  ns)
inline

Definition at line 1477 of file chrono.h.

◆ on_datetime()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_datetime ( numeric_system  ns)
inline

Definition at line 1408 of file chrono.h.

◆ on_day_of_month()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_day_of_month ( numeric_system  ns)
inline

Definition at line 1532 of file chrono.h.

◆ on_day_of_month_space()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_day_of_month_space ( numeric_system  ns)
inline

Definition at line 1536 of file chrono.h.

◆ on_day_of_year()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_day_of_year ( )
inline

Definition at line 1527 of file chrono.h.

◆ on_dec0_week_of_year()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_dec0_week_of_year ( numeric_system  ns)
inline

Definition at line 1501 of file chrono.h.

◆ on_dec0_weekday()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_dec0_weekday ( numeric_system  ns)
inline

Definition at line 1382 of file chrono.h.

◆ on_dec1_week_of_year()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_dec1_week_of_year ( numeric_system  ns)
inline

Definition at line 1506 of file chrono.h.

◆ on_dec1_weekday()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_dec1_weekday ( numeric_system  ns)
inline

Definition at line 1386 of file chrono.h.

◆ on_dec_month()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_dec_month ( numeric_system  ns)
inline

Definition at line 1495 of file chrono.h.

◆ on_duration_unit()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_duration_unit ( )
inline

Definition at line 1618 of file chrono.h.

◆ on_duration_value()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_duration_value ( )
inline

Definition at line 1617 of file chrono.h.

◆ on_full_month()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_full_month ( )
inline

Definition at line 1401 of file chrono.h.

◆ on_full_weekday()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_full_weekday ( )
inline

Definition at line 1376 of file chrono.h.

◆ on_iso_date()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_iso_date ( )
inline

Definition at line 1442 of file chrono.h.

◆ on_iso_time()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_iso_time ( )
inline

Definition at line 1601 of file chrono.h.

◆ on_iso_week_based_short_year()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_iso_week_based_short_year ( )
inline

Definition at line 1523 of file chrono.h.

◆ on_iso_week_based_year()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_iso_week_based_year ( )
inline

Definition at line 1522 of file chrono.h.

◆ on_iso_week_of_year()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_iso_week_of_year ( numeric_system  ns)
inline

Definition at line 1516 of file chrono.h.

◆ on_loc_date()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_loc_date ( numeric_system  ns)
inline

Definition at line 1423 of file chrono.h.

◆ on_loc_time()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_loc_time ( numeric_system  ns)
inline

Definition at line 1429 of file chrono.h.

◆ on_minute()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_minute ( numeric_system  ns,
pad_type  pad 
)
inline

Definition at line 1557 of file chrono.h.

◆ on_offset_year()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_offset_year ( )
inline

Definition at line 1472 of file chrono.h.

◆ on_second()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_second ( numeric_system  ns,
pad_type  pad 
)
inline

Definition at line 1563 of file chrono.h.

◆ on_short_year()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_short_year ( numeric_system  ns)
inline

Definition at line 1467 of file chrono.h.

◆ on_text()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
FMT_CONSTEXPR void detail::tm_writer< OutputIt, Char, Duration >::on_text ( const Char *  begin,
const Char *  end 
)
inline

Definition at line 1366 of file chrono.h.

◆ on_tz_name()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_tz_name ( )
inline

Definition at line 1460 of file chrono.h.

◆ on_us_date()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_us_date ( )
inline

Definition at line 1435 of file chrono.h.

◆ on_utc_offset()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_utc_offset ( numeric_system  ns)
inline

Definition at line 1459 of file chrono.h.

◆ on_year()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::on_year ( numeric_system  ns)
inline

Definition at line 1462 of file chrono.h.

◆ out()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::out ( ) const -> OutputIt
inline

Definition at line 1364 of file chrono.h.

◆ split_year_lower()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::split_year_lower ( long long  year) const -> int
inlineprivatenoexcept

Definition at line 1218 of file chrono.h.

◆ tm_hour()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::tm_hour ( ) const -> int
inlineprivatenoexcept

Definition at line 1186 of file chrono.h.

◆ tm_hour12()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::tm_hour12 ( ) const -> int
inlineprivatenoexcept

Definition at line 1208 of file chrono.h.

◆ tm_iso_week_of_year()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::tm_iso_week_of_year ( ) const -> int
inlineprivatenoexcept

Definition at line 1246 of file chrono.h.

◆ tm_iso_week_year()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::tm_iso_week_year ( ) const -> long long
inlineprivatenoexcept

Definition at line 1239 of file chrono.h.

◆ tm_mday()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::tm_mday ( ) const -> int
inlineprivatenoexcept

Definition at line 1190 of file chrono.h.

◆ tm_min()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::tm_min ( ) const -> int
inlineprivatenoexcept

Definition at line 1182 of file chrono.h.

◆ tm_mon()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::tm_mon ( ) const -> int
inlineprivatenoexcept

Definition at line 1194 of file chrono.h.

◆ tm_sec()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::tm_sec ( ) const -> int
inlineprivatenoexcept

Definition at line 1178 of file chrono.h.

◆ tm_wday()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::tm_wday ( ) const -> int
inlineprivatenoexcept

Definition at line 1199 of file chrono.h.

◆ tm_yday()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::tm_yday ( ) const -> int
inlineprivatenoexcept

Definition at line 1203 of file chrono.h.

◆ tm_year()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
auto detail::tm_writer< OutputIt, Char, Duration >::tm_year ( ) const -> long long
inlineprivatenoexcept

Definition at line 1198 of file chrono.h.

◆ write1()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::write1 ( int  value)
inlineprivate

Definition at line 1254 of file chrono.h.

◆ write2() [1/2]

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::write2 ( int  value)
inlineprivate

Definition at line 1257 of file chrono.h.

◆ write2() [2/2]

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::write2 ( int  value,
pad_type  pad 
)
inlineprivate

Definition at line 1262 of file chrono.h.

◆ write_utc_offset()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::write_utc_offset ( long  offset,
numeric_system  ns 
)
inlineprivate

Definition at line 1296 of file chrono.h.

◆ write_year()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::write_year ( long long  year)
inlineprivate

Definition at line 1287 of file chrono.h.

◆ write_year_extended()

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
void detail::tm_writer< OutputIt, Char, Duration >::write_year_extended ( long long  year)
inlineprivate

Definition at line 1274 of file chrono.h.

Member Data Documentation

◆ days_per_week

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
constexpr int detail::tm_writer< OutputIt, Char, Duration >::days_per_week = 7
staticconstexprprivate

Definition at line 1170 of file chrono.h.

◆ is_classic_

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
const bool detail::tm_writer< OutputIt, Char, Duration >::is_classic_
private

Definition at line 1173 of file chrono.h.

◆ loc_

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
const std::locale& detail::tm_writer< OutputIt, Char, Duration >::loc_
private

Definition at line 1172 of file chrono.h.

◆ out_

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
OutputIt detail::tm_writer< OutputIt, Char, Duration >::out_
private

Definition at line 1174 of file chrono.h.

◆ subsecs_

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
const Duration* detail::tm_writer< OutputIt, Char, Duration >::subsecs_
private

Definition at line 1175 of file chrono.h.

◆ tm_

template<typename OutputIt , typename Char , typename Duration = std::chrono::seconds>
const std::tm& detail::tm_writer< OutputIt, Char, Duration >::tm_
private

Definition at line 1176 of file chrono.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:52