boost::date_time::date_generator_parser — Class for date_generator parsing.
Synopsis
// In header: <boost/date_time/date_generator_parser.hpp>
template<typename date_type,typename charT>classdate_generator_parser{public:// typestypedefstd::basic_string<charT>string_type;typedefstd::istreambuf_iterator<charT>stream_itr_type;typedefdate_type::month_typemonth_type;typedefdate_type::day_of_week_typeday_of_week_type;typedefdate_type::day_typeday_type;typedefstring_parse_tree<charT>parse_tree_type;typedef parse_tree_type::parse_match_result_type match_results;typedefstd::vector<std::basic_string<charT>>collection_type;typedefpartial_date<date_type>partial_date_type;typedefnth_kday_of_month<date_type>nth_kday_type;typedeffirst_kday_of_month<date_type>first_kday_type;typedeflast_kday_of_month<date_type>last_kday_type;typedeffirst_kday_after<date_type>kday_after_type;typedeffirst_kday_before<date_type>kday_before_type;typedefcharTchar_type;enumphrase_elements { first = =0, second, third, fourth, fifth, last,
before, after, of, number_of_phrase_elements };// construct/copy/destructdate_generator_parser();date_generator_parser(conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&);// public member functionsvoidelement_strings(conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&,conststring_type&);voidelement_strings(constcollection_type&);template<typename facet_type>partial_date_typeget_partial_date_type(stream_itr_type&,stream_itr_type&,std::ios_base&,constfacet_type&)const;template<typename facet_type>nth_kday_typeget_nth_kday_type(stream_itr_type&,stream_itr_type&,std::ios_base&,constfacet_type&)const;template<typename facet_type>first_kday_typeget_first_kday_type(stream_itr_type&,stream_itr_type&,std::ios_base&,constfacet_type&)const;template<typename facet_type>last_kday_typeget_last_kday_type(stream_itr_type&,stream_itr_type&,std::ios_base&,constfacet_type&)const;template<typename facet_type>kday_before_typeget_kday_before_type(stream_itr_type&,stream_itr_type&,std::ios_base&,constfacet_type&)const;template<typename facet_type>kday_after_typeget_kday_after_type(stream_itr_type&,stream_itr_type&,std::ios_base&,constfacet_type&)const;// private member functionsvoidextract_element(stream_itr_type&,stream_itr_type&,typenamedate_generator_parser::phrase_elements)const;// public data membersstaticconstchar_typefirst_string;staticconstchar_typesecond_string;staticconstchar_typethird_string;staticconstchar_typefourth_string;staticconstchar_typefifth_string;staticconstchar_typelast_string;staticconstchar_typebefore_string;staticconstchar_typeafter_string;staticconstchar_typeof_string;};
Description
Элементы «фразы» генератора дат анализируются из входного потока в определенном порядке. Все элементы необходимы, и порядок, в котором они появляются, не может измениться, однако сами элементы могут быть изменены. Элементы по умолчанию и их порядок следующие:
>Извлекает элемент фразы из ввода. Скачать ios_base::failure on error
Статья Class template date_generator_parser раздела The Boost C++ Libraries BoostBook Documentation Subset Library Reference может быть полезна для разработчиков на c++ и boost.
Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.