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


Struct template counted_time_rep

boost::date_time::counted_time_rep — Time representation that uses a single integer count.


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

template<typename config> 
struct counted_time_rep {
  // types
  typedef config::int_type           int_type;          
  typedef config::date_type          date_type;         
  typedef config::impl_type          impl_type;         
  typedef date_type::duration_type   date_duration_type;
  typedef date_type::calendar_type   calendar_type;     
  typedef date_type::ymd_type        ymd_type;          
  typedef config::time_duration_type time_duration_type;
  typedef config::resolution_traits  resolution_traits; 

  // construct/copy/destruct
  counted_time_rep(const date_type &, const time_duration_type &);
  explicit counted_time_rep(int_type);
  explicit counted_time_rep(impl_type);

  // public member functions
  BOOST_CXX14_CONSTEXPR date_type date() const;
  BOOST_CXX14_CONSTEXPR unsigned long day_count() const;
  BOOST_CXX14_CONSTEXPR int_type time_count() const;
  BOOST_CXX14_CONSTEXPR int_type tod() const;
  BOOST_CXX14_CONSTEXPR bool is_pos_infinity() const;
  BOOST_CXX14_CONSTEXPR bool is_neg_infinity() const;
  BOOST_CXX14_CONSTEXPR bool is_not_a_date_time() const;
  BOOST_CXX14_CONSTEXPR bool is_special() const;
  BOOST_CXX14_CONSTEXPR impl_type get_rep() const;

  // public static functions
  static BOOST_CXX14_CONSTEXPR int_type frac_sec_per_day();


counted_time_rep public construct/copy/destruct

  1. counted_time_rep(const date_type & d, const time_duration_type & time_of_day);
  2. explicit counted_time_rep(int_type count);
  3. explicit counted_time_rep(impl_type count);

counted_time_rep public member functions

  1. BOOST_CXX14_CONSTEXPR date_type date() const;
  2. BOOST_CXX14_CONSTEXPR unsigned long day_count() const;
  3. BOOST_CXX14_CONSTEXPR int_type time_count() const;
  4. BOOST_CXX14_CONSTEXPR int_type tod() const;
  5. BOOST_CXX14_CONSTEXPR bool is_pos_infinity() const;
  6. BOOST_CXX14_CONSTEXPR bool is_neg_infinity() const;
  7. BOOST_CXX14_CONSTEXPR bool is_not_a_date_time() const;
  8. BOOST_CXX14_CONSTEXPR bool is_special() const;
  9. BOOST_CXX14_CONSTEXPR impl_type get_rep() const;

counted_time_rep public static functions

  1. static BOOST_CXX14_CONSTEXPR int_type frac_sec_per_day();