Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::date_time::date_input_facet< date_type, CharT, InItrT > Class Template Reference

Input facet. More...

#include <date_facet.hpp>

Inheritance diagram for boost::date_time::date_input_facet< date_type, CharT, InItrT >:
Collaboration diagram for boost::date_time::date_input_facet< date_type, CharT, InItrT >:

Public Types

typedef date_type::duration_type duration_type
 
typedef date_type::day_of_week_type day_of_week_type
 
typedef date_type::day_type day_type
 
typedef date_type::month_type month_type
 
typedef date_type::year_type year_type
 
typedef
boost::date_time::period
< date_type, duration_type
period_type
 
typedef std::basic_string< CharT > string_type
 
typedef CharT char_type
 
typedef
boost::date_time::period_parser
< date_type, CharT > 
period_parser_type
 
typedef
boost::date_time::special_values_parser
< date_type, CharT > 
special_values_parser_type
 
typedef std::vector
< std::basic_string< CharT > > 
input_collection_type
 
typedef format_date_parser
< date_type, CharT > 
format_date_parser_type
 
typedef date_generator_parser
< date_type, CharT > 
date_gen_parser_type
 
typedef partial_date< date_type > partial_date_type
 
typedef nth_kday_of_month
< date_type > 
nth_kday_type
 
typedef first_kday_of_month
< date_type > 
first_kday_type
 
typedef last_kday_of_month
< date_type > 
last_kday_type
 
typedef first_kday_after
< date_type > 
kday_after_type
 
typedef first_kday_before
< date_type > 
kday_before_type
 

Public Member Functions

 date_input_facet (::size_t a_ref=0)
 
 date_input_facet (const string_type &format_str,::size_t a_ref=0)
 
 date_input_facet (const string_type &format_str, const format_date_parser_type &date_parser, const special_values_parser_type &sv_parser, const period_parser_type &per_parser, const date_gen_parser_type &date_gen_parser,::size_t ref_count=0)
 
void format (const char_type *const format_str)
 
virtual void set_iso_format ()
 
virtual void set_iso_extended_format ()
 
void month_format (const char_type *const format_str)
 
void weekday_format (const char_type *const format_str)
 
void year_format (const char_type *const format_str)
 
void period_parser (period_parser_type per_parser)
 
void short_weekday_names (const input_collection_type &weekday_names)
 
void long_weekday_names (const input_collection_type &weekday_names)
 
void short_month_names (const input_collection_type &month_names)
 
void long_month_names (const input_collection_type &month_names)
 
void date_gen_element_strings (const input_collection_type &col)
 
void date_gen_element_strings (const string_type &first, const string_type &second, const string_type &third, const string_type &fourth, const string_type &fifth, const string_type &last, const string_type &before, const string_type &after, const string_type &of)
 
void special_values_parser (special_values_parser_type sv_parser)
 
InItrT get (InItrT &from, InItrT &to, std::ios_base &, date_type &d) const
 
InItrT get (InItrT &from, InItrT &to, std::ios_base &, month_type &m) const
 
InItrT get (InItrT &from, InItrT &to, std::ios_base &, day_of_week_type &wd) const
 
InItrT get (InItrT &from, InItrT &to, std::ios_base &, day_type &d) const
 Expects 1 or 2 digit day range: 1-31. More...
 
InItrT get (InItrT &from, InItrT &to, std::ios_base &, year_type &y) const
 
InItrT get (InItrT &from, InItrT &to, std::ios_base &a_ios, duration_type &dd) const
 
InItrT get (InItrT &from, InItrT &to, std::ios_base &a_ios, period_type &p) const
 
InItrT get (InItrT &from, InItrT &to, std::ios_base &a_ios, nth_kday_type &nkd) const
 
InItrT get (InItrT &from, InItrT &to, std::ios_base &a_ios, partial_date_type &pd) const
 
InItrT get (InItrT &from, InItrT &to, std::ios_base &a_ios, first_kday_type &fkd) const
 
InItrT get (InItrT &from, InItrT &to, std::ios_base &a_ios, last_kday_type &lkd) const
 
InItrT get (InItrT &from, InItrT &to, std::ios_base &a_ios, kday_before_type &fkb) const
 
InItrT get (InItrT &from, InItrT &to, std::ios_base &a_ios, kday_after_type &fka) const
 

Static Public Attributes

static const char_type long_weekday_format [3] = {'%','A'}
 
static const char_type short_weekday_format [3] = {'%','a'}
 
static const char_type long_month_format [3] = {'%','B'}
 
static const char_type short_month_format [3] = {'%','b'}
 
static const char_type four_digit_year_format [3] = {'%','Y'}
 
static const char_type two_digit_year_format [3] = {'%','y'}
 
static const char_type default_period_separator [4] = { ' ', '/', ' '}
 
static const char_type standard_format_specifier [3]
 
static const char_type iso_format_specifier [7]
 
static const char_type iso_format_extended_specifier [9]
 
static const char_type default_date_format [9]
 
static std::locale::id id
 

Protected Attributes

string_type m_format
 
string_type m_month_format
 
string_type m_weekday_format
 
string_type m_year_format
 
format_date_parser_type m_parser
 
date_gen_parser_type m_date_gen_parser
 
period_parser_type m_period_parser
 
special_values_parser_type m_sv_parser
 

Detailed Description

template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
class boost::date_time::date_input_facet< date_type, CharT, InItrT >

Input facet.

Member Typedef Documentation

template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef CharT boost::date_time::date_input_facet< date_type, CharT, InItrT >::char_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef date_generator_parser<date_type, CharT> boost::date_time::date_input_facet< date_type, CharT, InItrT >::date_gen_parser_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef date_type::day_of_week_type boost::date_time::date_input_facet< date_type, CharT, InItrT >::day_of_week_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef date_type::day_type boost::date_time::date_input_facet< date_type, CharT, InItrT >::day_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef date_type::duration_type boost::date_time::date_input_facet< date_type, CharT, InItrT >::duration_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef first_kday_of_month<date_type> boost::date_time::date_input_facet< date_type, CharT, InItrT >::first_kday_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef format_date_parser<date_type, CharT> boost::date_time::date_input_facet< date_type, CharT, InItrT >::format_date_parser_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef std::vector<std::basic_string<CharT> > boost::date_time::date_input_facet< date_type, CharT, InItrT >::input_collection_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef first_kday_after<date_type> boost::date_time::date_input_facet< date_type, CharT, InItrT >::kday_after_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef first_kday_before<date_type> boost::date_time::date_input_facet< date_type, CharT, InItrT >::kday_before_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef last_kday_of_month<date_type> boost::date_time::date_input_facet< date_type, CharT, InItrT >::last_kday_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef date_type::month_type boost::date_time::date_input_facet< date_type, CharT, InItrT >::month_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef nth_kday_of_month<date_type> boost::date_time::date_input_facet< date_type, CharT, InItrT >::nth_kday_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef partial_date<date_type> boost::date_time::date_input_facet< date_type, CharT, InItrT >::partial_date_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef boost::date_time::period_parser<date_type, CharT> boost::date_time::date_input_facet< date_type, CharT, InItrT >::period_parser_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef boost::date_time::period<date_type,duration_type> boost::date_time::date_input_facet< date_type, CharT, InItrT >::period_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef boost::date_time::special_values_parser<date_type,CharT> boost::date_time::date_input_facet< date_type, CharT, InItrT >::special_values_parser_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef std::basic_string<CharT> boost::date_time::date_input_facet< date_type, CharT, InItrT >::string_type
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
typedef date_type::year_type boost::date_time::date_input_facet< date_type, CharT, InItrT >::year_type

Constructor & Destructor Documentation

template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
boost::date_time::date_input_facet< date_type, CharT, InItrT >::date_input_facet ( ::size_t  a_ref = 0)
inlineexplicit
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
boost::date_time::date_input_facet< date_type, CharT, InItrT >::date_input_facet ( const string_type format_str,
::size_t  a_ref = 0 
)
inlineexplicit
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
boost::date_time::date_input_facet< date_type, CharT, InItrT >::date_input_facet ( const string_type format_str,
const format_date_parser_type date_parser,
const special_values_parser_type sv_parser,
const period_parser_type per_parser,
const date_gen_parser_type date_gen_parser,
::size_t  ref_count = 0 
)
inlineexplicit

Member Function Documentation

template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
void boost::date_time::date_input_facet< date_type, CharT, InItrT >::date_gen_element_strings ( const input_collection_type col)
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
void boost::date_time::date_input_facet< date_type, CharT, InItrT >::date_gen_element_strings ( const string_type first,
const string_type second,
const string_type third,
const string_type fourth,
const string_type fifth,
const string_type last,
const string_type before,
const string_type after,
const string_type of 
)
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
void boost::date_time::date_input_facet< date_type, CharT, InItrT >::format ( const char_type *const  format_str)
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
InItrT boost::date_time::date_input_facet< date_type, CharT, InItrT >::get ( InItrT &  from,
InItrT &  to,
std::ios_base &  ,
date_type &  d 
) const
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
InItrT boost::date_time::date_input_facet< date_type, CharT, InItrT >::get ( InItrT &  from,
InItrT &  to,
std::ios_base &  ,
month_type m 
) const
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
InItrT boost::date_time::date_input_facet< date_type, CharT, InItrT >::get ( InItrT &  from,
InItrT &  to,
std::ios_base &  ,
day_of_week_type wd 
) const
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
InItrT boost::date_time::date_input_facet< date_type, CharT, InItrT >::get ( InItrT &  from,
InItrT &  to,
std::ios_base &  ,
day_type d 
) const
inline

Expects 1 or 2 digit day range: 1-31.

template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
InItrT boost::date_time::date_input_facet< date_type, CharT, InItrT >::get ( InItrT &  from,
InItrT &  to,
std::ios_base &  ,
year_type y 
) const
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
InItrT boost::date_time::date_input_facet< date_type, CharT, InItrT >::get ( InItrT &  from,
InItrT &  to,
std::ios_base &  a_ios,
duration_type dd 
) const
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
InItrT boost::date_time::date_input_facet< date_type, CharT, InItrT >::get ( InItrT &  from,
InItrT &  to,
std::ios_base &  a_ios,
period_type p 
) const
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
InItrT boost::date_time::date_input_facet< date_type, CharT, InItrT >::get ( InItrT &  from,
InItrT &  to,
std::ios_base &  a_ios,
nth_kday_type nkd 
) const
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
InItrT boost::date_time::date_input_facet< date_type, CharT, InItrT >::get ( InItrT &  from,
InItrT &  to,
std::ios_base &  a_ios,
partial_date_type pd 
) const
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
InItrT boost::date_time::date_input_facet< date_type, CharT, InItrT >::get ( InItrT &  from,
InItrT &  to,
std::ios_base &  a_ios,
first_kday_type fkd 
) const
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
InItrT boost::date_time::date_input_facet< date_type, CharT, InItrT >::get ( InItrT &  from,
InItrT &  to,
std::ios_base &  a_ios,
last_kday_type lkd 
) const
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
InItrT boost::date_time::date_input_facet< date_type, CharT, InItrT >::get ( InItrT &  from,
InItrT &  to,
std::ios_base &  a_ios,
kday_before_type fkb 
) const
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
InItrT boost::date_time::date_input_facet< date_type, CharT, InItrT >::get ( InItrT &  from,
InItrT &  to,
std::ios_base &  a_ios,
kday_after_type fka 
) const
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
void boost::date_time::date_input_facet< date_type, CharT, InItrT >::long_month_names ( const input_collection_type month_names)
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
void boost::date_time::date_input_facet< date_type, CharT, InItrT >::long_weekday_names ( const input_collection_type weekday_names)
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
void boost::date_time::date_input_facet< date_type, CharT, InItrT >::month_format ( const char_type *const  format_str)
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
void boost::date_time::date_input_facet< date_type, CharT, InItrT >::period_parser ( period_parser_type  per_parser)
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
virtual void boost::date_time::date_input_facet< date_type, CharT, InItrT >::set_iso_extended_format ( )
inlinevirtual
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
virtual void boost::date_time::date_input_facet< date_type, CharT, InItrT >::set_iso_format ( )
inlinevirtual
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
void boost::date_time::date_input_facet< date_type, CharT, InItrT >::short_month_names ( const input_collection_type month_names)
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
void boost::date_time::date_input_facet< date_type, CharT, InItrT >::short_weekday_names ( const input_collection_type weekday_names)
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
void boost::date_time::date_input_facet< date_type, CharT, InItrT >::special_values_parser ( special_values_parser_type  sv_parser)
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
void boost::date_time::date_input_facet< date_type, CharT, InItrT >::weekday_format ( const char_type *const  format_str)
inline
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
void boost::date_time::date_input_facet< date_type, CharT, InItrT >::year_format ( const char_type *const  format_str)
inline

Member Data Documentation

template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
const date_input_facet< date_type, CharT, OutItrT >::char_type boost::date_time::date_input_facet< date_type, CharT, OutItrT >::default_date_format
static
Initial value:
=
{'%','Y','-','%','b','-','%','d'}
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
const date_input_facet< date_type, CharT, OutItrT >::char_type boost::date_time::date_input_facet< date_type, CharT, OutItrT >::default_period_separator = { ' ', '/', ' '}
static
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
const date_input_facet< date_type, CharT, OutItrT >::char_type boost::date_time::date_input_facet< date_type, CharT, OutItrT >::four_digit_year_format = {'%','Y'}
static
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
std::locale::id boost::date_time::date_input_facet< date_type, CharT, OutItrT >::id
static
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
const date_input_facet< date_type, CharT, OutItrT >::char_type boost::date_time::date_input_facet< date_type, CharT, OutItrT >::iso_format_extended_specifier
static
Initial value:
=
{'%', 'Y', '-', '%', 'm', '-', '%', 'd' }

Referenced by boost::date_time::date_input_facet< time_type::date_type, CharT, InItrT >::set_iso_extended_format().

template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
const date_input_facet< date_type, CharT, OutItrT >::char_type boost::date_time::date_input_facet< date_type, CharT, OutItrT >::iso_format_specifier
static
Initial value:
=
{'%', 'Y', '%', 'm', '%', 'd' }

Referenced by boost::date_time::date_input_facet< time_type::date_type, CharT, InItrT >::set_iso_format().

template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
const date_input_facet< date_type, CharT, OutItrT >::char_type boost::date_time::date_input_facet< date_type, CharT, OutItrT >::long_month_format = {'%','B'}
static
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
const date_input_facet< date_type, CharT, OutItrT >::char_type boost::date_time::date_input_facet< date_type, CharT, OutItrT >::long_weekday_format = {'%','A'}
static
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
date_gen_parser_type boost::date_time::date_input_facet< date_type, CharT, InItrT >::m_date_gen_parser
protected
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
string_type boost::date_time::date_input_facet< date_type, CharT, InItrT >::m_month_format
protected
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
period_parser_type boost::date_time::date_input_facet< date_type, CharT, InItrT >::m_period_parser
protected
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
special_values_parser_type boost::date_time::date_input_facet< date_type, CharT, InItrT >::m_sv_parser
protected
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
string_type boost::date_time::date_input_facet< date_type, CharT, InItrT >::m_weekday_format
protected
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
string_type boost::date_time::date_input_facet< date_type, CharT, InItrT >::m_year_format
protected
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
const date_input_facet< date_type, CharT, OutItrT >::char_type boost::date_time::date_input_facet< date_type, CharT, OutItrT >::short_month_format = {'%','b'}
static
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
const date_input_facet< date_type, CharT, OutItrT >::char_type boost::date_time::date_input_facet< date_type, CharT, OutItrT >::short_weekday_format = {'%','a'}
static
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
const date_input_facet< date_type, CharT, OutItrT >::char_type boost::date_time::date_input_facet< date_type, CharT, OutItrT >::standard_format_specifier
static
Initial value:
=
{'%', 'x' }
template<class date_type, class CharT, class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> >>
const date_input_facet< date_type, CharT, OutItrT >::char_type boost::date_time::date_input_facet< date_type, CharT, OutItrT >::two_digit_year_format = {'%','y'}
static

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