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


Class template all_date_names_put

boost::date_time::all_date_names_put — A date name output facet that takes an array of char* to define strings.


// In header: <boost/date_time/date_names_put.hpp>

template<typename Config, typename charT = char, 
         typename OutputIterator = std::ostreambuf_iterator<charT> > 
class all_date_names_put : public boost::date_time::date_names_put< Config, char, std::ostreambuf_iterator< char > >
  // types
  typedef OutputIterator             iter_type;         
  typedef Config::month_enum         month_enum;        
  typedef Config::weekday_enum       weekday_enum;      
  typedef Config::special_value_enum special_value_enum;

  // construct/copy/destruct
  all_date_names_put(const charT *const, const charT *const, 
                     const charT *const, const charT *const, 
                     const charT *const, charT = '-', 
                     ymd_order_spec = ymd_order_iso, 
                     month_format_spec = month_as_short_string);

  // public member functions
  const charT *const * get_short_month_names() const;
  const charT *const * get_long_month_names() const;
  const charT *const * get_special_value_names() const;
  const charT *const * get_short_weekday_names() const;
  const charT *const * get_long_weekday_names() 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 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;


all_date_names_put public construct/copy/destruct

  1. all_date_names_put(const charT *const month_short_names, 
                       const charT *const month_long_names, 
                       const charT *const special_value_names, 
                       const charT *const weekday_short_names, 
                       const charT *const weekday_long_names, 
                       charT separator_char = '-', 
                       ymd_order_spec order_spec = ymd_order_iso, 
                       month_format_spec month_format = month_as_short_string);

all_date_names_put public member functions

  1. const charT *const * get_short_month_names() const;
  2. const charT *const * get_long_month_names() const;
  3. const charT *const * get_special_value_names() const;
  4. const charT *const * get_short_weekday_names() const;
  5. const charT *const * get_long_weekday_names() const;

all_date_names_put protected member functions

  1. virtual void do_put_month_short(iter_type & oitr, month_enum moy) const;
    Generic facet that takes array of chars.
  2. virtual void do_put_month_long(iter_type & oitr, month_enum moy) const;
    Long month names.
  3. virtual void 
    do_put_special_value(iter_type & oitr, special_value_enum sv) const;
    Special values names.
  4. virtual void do_put_weekday_short(iter_type & oitr, weekday_enum wd) const;
  5. virtual void do_put_weekday_long(iter_type & oitr, weekday_enum wd) const;
  6. virtual void do_month_sep_char(iter_type & oitr) const;
    char between year-month
  7. virtual void do_day_sep_char(iter_type & oitr) const;
    Char to separate month-day.
  8. virtual ymd_order_spec do_date_order() const;
    Set the date ordering.
  9. virtual month_format_spec do_month_format() const;
    Set the date ordering.