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

Class template date_duration

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_duration

boost::date_time::date_duration — Duration type with date level resolution.

Synopsis

// In header: <boost/date_time/date_duration.hpp>
template<typename duration_rep_traits> 
class date_duration : private boost::less_than_comparable1< date_duration< duration_rep_traits >, boost::equality_comparable1< date_duration< duration_rep_traits >, boost::addable1< date_duration< duration_rep_traits >, boost::subtractable1< date_duration< duration_rep_traits >, boost::dividable2< date_duration< duration_rep_traits >, int > > > > >
{
public:
  // types
  typedef duration_rep_traits::int_type  duration_rep_type;
  typedef duration_rep_traits::impl_type duration_rep;     
  // construct/copy/destruct
  explicit date_duration(duration_rep);
  date_duration(special_values);
  date_duration(const date_duration< duration_rep_traits > &);
  // public member functions
  duration_rep get_rep() const;
  bool is_special() const;
  duration_rep_type days() const;
  bool operator==(const date_duration &) const;
  bool operator<(const date_duration &) const;
  date_duration & operator-=(const date_duration &);
  date_duration & operator+=(const date_duration &);
  date_duration operator-() const;
  date_duration & operator/=(int);
  bool is_negative() const;
  // public static functions
  static date_duration unit();
};

Description

date_duration public construct/copy/destruct

  1. <
    explicitdate_duration(duration_repday_count);
    >Построй из расчета дня.
  2. <
    date_duration(special_valuessv);
    >

    построено из специальных значений - работает только при инстанцированном с<duration_traits_adapted>

  3. <
    date_duration(constdate_duration<duration_rep_traits>&other);
    >Построение из другого<date_duration>(Конструктор копий)

date_duration public member functions

  1. <
    duration_repget_rep()const;
    >возвращает дни_, поскольку это мгновенный тип - используется для потоковой передачи
  2. <
    boolis_special()const;
    >
  3. <
    duration_rep_typedays()const;
    >возвращает дни в качестве стоимости, а не объекта.
  4. <
    booloperator==(constdate_duration&rhs)const;
    >Равенство.
  5. <
    booloperator<(constdate_duration&rhs)const;
    >Меньше.
  6. <
    date_duration&operator-=(constdate_duration&rhs);
    >Вычтите другую продолжительность и #8211; результат подписан.
  7. <
    date_duration&operator+=(constdate_duration&rhs);
    >Добавить продолжительность и #8211; результат подписан.
  8. <
    date_durationoperator-()const;
    >unary - Позволяет для dd = -date_duration(2); ->dd == -2
  9. <
    date_duration&operator/=(intdivisor);
    >Операции дивизиона на длительность с целым числом.
  10. <
    boolis_negative()const;
    >Обратный знак

date_duration public static functions

  1. <
    staticdate_durationunit();
    >Возвращает наименьшую продолжительность – используется для вычисления «конца».

PrevUpHomeNext

Статья Class template date_duration раздела 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-05-19 20:30:04/0.0086431503295898/1