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 format_date_time_terminal



// In header: <boost/log/expressions/formatters/date_time.hpp>

template<typename T, typename FallbackPolicyT, typename CharT> 
class format_date_time_terminal {
  // types
  typedef T                                     value_type;               // Attribute value type. 
  typedef FallbackPolicyT                       fallback_policy;          // Fallback policy. 
  typedef CharT                                 char_type;                // Character type. 
  typedef std::basic_string< char_type >        string_type;              // String type. 
  typedef basic_formatting_ostream< char_type > stream_type;              // Formatting stream type. 
  typedef unspecified                           formatter_function_type;  // Formatter function. 
  typedef string_type                           result_type;              // Function result type. 

  // construct/copy/destruct
  format_date_time_terminal(attribute_name const &, fallback_policy const &, 
                            string_type const &);
  format_date_time_terminal(format_date_time_terminal const &);
  format_date_time_terminal() = delete;

  // public member functions
  attribute_name get_name() const;
  fallback_policy const & get_fallback_policy() const;
  formatter_function_type const & get_formatter_function() const;
  template<typename ContextT> result_type operator()(ContextT const &);
  template<typename ContextT> result_type operator()(ContextT const &) const;


Date and time formatter terminal.

format_date_time_terminal public construct/copy/destruct

  1. format_date_time_terminal(attribute_name const & name, 
                              fallback_policy const & fallback, 
                              string_type const & format);
    Initializing constructor.
  2. format_date_time_terminal(format_date_time_terminal const & that);
    Copy constructor.
  3. format_date_time_terminal() = delete;

format_date_time_terminal public member functions

  1. attribute_name get_name() const;
    Returns attribute name.
  2. fallback_policy const & get_fallback_policy() const;
    Returns fallback policy.
  3. formatter_function_type const & get_formatter_function() const;
    Retruns formatter function.
  4. template<typename ContextT> result_type operator()(ContextT const & ctx);
    Invokation operator.
  5. template<typename ContextT> result_type operator()(ContextT const & ctx) const;
    Invokation operator.