CLASS TEMPLATE(3)

NAME
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
  void do_put_month_short(iter_type &, month_enum) const;
  void do_put_month_long(iter_type &, month_enum) const;
  void do_put_special_value(iter_type &, special_value_enum) const;
  void do_put_weekday_short(iter_type &, weekday_enum) const;
  void do_put_weekday_long(iter_type &, weekday_enum) const;
  bool do_has_date_sep_chars() const;
  void do_year_sep_char(iter_type &) const;
  void do_month_sep_char(iter_type &) const;
  void do_day_sep_char(iter_type &) const;
  ymd_order_spec do_date_order() const;
  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;
  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

This class is a base class for date facets used to localize the names of months and the names of days in the week.

Requirements of Config

    &#8226; define an enumeration month_enum that enumerates the months. The enumeration should be '1' based eg: Jan==1

    &#8226; define as_short_string and as_long_string

(see 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.

    void put_special_value(iter_type & oitr, special_value_enum sv) const;

    3.

    void put_month_short(iter_type & oitr, month_enum moy) const;

    4.

    void put_month_long(iter_type & oitr, month_enum moy) const;

    5.

    void put_weekday_short(iter_type & oitr, weekday_enum wd) const;

    6.

    void put_weekday_long(iter_type & oitr, weekday_enum wd) const;

    7.

    bool has_date_sep_chars() const;

    8.

    void year_sep_char(iter_type & oitr) const;

    9.

    void month_sep_char(iter_type & oitr) const;
    char between year-month .RE

        10.

        void day_sep_char(iter_type & oitr) const;
        Char to separate month-day. .RE

            11.

            ymd_order_spec date_order() const;
            Determines the order to put the date elements. .RE

                12.

                month_format_spec month_format() const;
                Determines if month is displayed as integer, short or long string. .RE

  date_names_put protected member functions

    1.

    void do_put_month_short(iter_type & oitr, month_enum moy) const;
    Default facet implementation uses month_type defaults. .RE

        2.

        void do_put_month_long(iter_type & oitr, month_enum moy) const;
        Default facet implementation uses month_type defaults. .RE

            3.

            void do_put_special_value(iter_type & oitr, special_value_enum sv) const;
            Default facet implementation for special value types. .RE

                4.

                void do_put_weekday_short(iter_type &, weekday_enum) const;

                5.

                void do_put_weekday_long(iter_type &, weekday_enum) const;

                6.

                bool do_has_date_sep_chars() const;

                7.

                void do_year_sep_char(iter_type & oitr) const;

                8.

                void do_month_sep_char(iter_type & oitr) const;
                char between year-month .RE

                    9.

                    void do_day_sep_char(iter_type & oitr) const;
                    Char to separate month-day. .RE

                        10.

                        ymd_order_spec do_date_order() const;
                        Default for date order. .RE

                            11.

                            month_format_spec do_month_format() const;
                            Default month format. .RE

                                12.

                                void put_string(iter_type & oi, const charT *const s) const;

                                13.

                                void put_string(iter_type & oi, const string_type & s1) const;