Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Class template date_names_put

Boost , The Boost C++ Libraries BoostBook Documentation Subset , Library Reference

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Class template date_names_put

boost::date_time::date_names_put — Output facet base class for gregorian dates.

Synopsis

// In header: <boost/date_time/date_names_put.hpp>
template<typename Config, typename charT = char, 
         typename OutputIterator = std::ostreambuf_iterator<charT> > 
class date_names_put : public facet {
public:
  // types
  typedef OutputIterator             iter_type;         
  typedef Config::month_type         month_type;        
  typedef Config::month_enum         month_enum;        
  typedef Config::weekday_enum       weekday_enum;      
  typedef Config::special_value_enum special_value_enum;
  typedef std::basic_string< charT > string_type;       
  typedef charT                      char_type;         
  // construct/copy/destruct
  date_names_put();
  // public member functions
  std::locale::id & __get_id(void) const;
  void put_special_value(iter_type &, special_value_enum) const;
  void put_month_short(iter_type &, month_enum) const;
  void put_month_long(iter_type &, month_enum) const;
  void put_weekday_short(iter_type &, weekday_enum) const;
  void put_weekday_long(iter_type &, weekday_enum) const;
  bool has_date_sep_chars() const;
  void year_sep_char(iter_type &) const;
  void month_sep_char(iter_type &) const;
  void day_sep_char(iter_type &) const;
  ymd_order_spec date_order() const;
  month_format_spec month_format() const;
  // protected member functions
  virtual void do_put_month_short(iter_type &, month_enum) const;
  virtual void do_put_month_long(iter_type &, month_enum) const;
  virtual void do_put_special_value(iter_type &, special_value_enum) const;
  virtual void do_put_weekday_short(iter_type &, weekday_enum) const;
  virtual void do_put_weekday_long(iter_type &, weekday_enum) const;
  virtual bool do_has_date_sep_chars() const;
  virtual void do_year_sep_char(iter_type &) const;
  virtual void do_month_sep_char(iter_type &) const;
  virtual void do_day_sep_char(iter_type &) const;
  virtual ymd_order_spec do_date_order() const;
  virtual month_format_spec do_month_format() const;
  void put_string(iter_type &, const charT *const) const;
  void put_string(iter_type &, const string_type &) const;
  // public data members
  static const char_type default_special_value_names;
  static const char_type separator;
  static std::locale::id id;  // Generate storage location for a std::locale::id. 
};

Description

Этот класс является базовым классом для граней дат, используемых для локализации названий месяцев и названий дней недели.

Требования к Config

  • Определить месяц перечисления, который перечисляет месяцы. Перечисление должно быть основано на '1' например: Jan ==1

  • Определить как_short_string и как_long_string

(см. langer & kreft p334).

date_names_put public construct/copy/destruct

  1. <
    date_names_put();
    >

date_names_put public member functions

  1. <
    std::locale::id&__get_id(void)const;
    >
  2. <
    voidput_special_value(iter_type&oitr,special_value_enumsv)const;
    >
  3. <
    voidput_month_short(iter_type&oitr,month_enummoy)const;
    >
  4. <
    voidput_month_long(iter_type&oitr,month_enummoy)const;
    >
  5. <
    voidput_weekday_short(iter_type&oitr,weekday_enumwd)const;
    >
  6. <
    voidput_weekday_long(iter_type&oitr,weekday_enumwd)const;
    >
  7. <
    boolhas_date_sep_chars()const;
    >
  8. <
    voidyear_sep_char(iter_type&oitr)const;
    >
  9. voidmonth_sep_char(iter_type&oitr)const;
    Срок годности
  10. voidday_sep_char(iter_type&oitr)const;
    Отделить день от месяца.
  11. <
    ymd_order_specdate_order()const;
    >Определяет порядок размещения элементов даты.
  12. month_format_specmonth_format()const;
    Определяет, отображается ли месяц как целое число, короткая или длинная строка.

date_names_put protected member functions

  1. virtualvoiddo_put_month_short(iter_type&oitr,month_enummoy)const;
    Реализация по умолчанию использует дефолты типа month_type.
  2. <
    virtualvoiddo_put_month_long(iter_type&oitr,month_enummoy)const;
    >Реализация по умолчанию использует дефолты типа month_type.
  3. <
    virtualvoid
    do_put_special_value(iter_type&oitr,special_value_enumsv)const;
    >Реализация по умолчанию для специальных типов значений.
  4. <
    virtualvoiddo_put_weekday_short(iter_type&,weekday_enum)const;
    >
  5. <
    virtualvoiddo_put_weekday_long(iter_type&,weekday_enum)const;
    >
  6. <
    virtualbooldo_has_date_sep_chars()const;
    >
  7. <
    virtualvoiddo_year_sep_char(iter_type&oitr)const;
    >
  8. virtualvoiddo_month_sep_char(iter_type&oitr)const;
    в период между месяцами
  9. <
    virtualvoiddo_day_sep_char(iter_type&oitr)const;
    >Отделить день от месяца.
  10. <
    virtualymd_order_specdo_date_order()const;
    >Невыполнение предписаний.
  11. <
    virtualmonth_format_specdo_month_format()const;
    >Формат месяца по умолчанию.
  12. <
    voidput_string(iter_type&oi,constcharT*consts)const;
    >
  13. <
    voidput_string(iter_type&oi,conststring_type&s1)const;
    >

PrevUpHomeNext

Статья Class template date_names_put раздела The Boost C++ Libraries BoostBook Documentation Subset Library Reference может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: Library Reference ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-07-04 23:33:58/0.0068700313568115/0