BVB Source Codes

mars Show gregorian_types.hpp Source code

Return Download mars: download gregorian_types.hpp Source code - Download mars Source code - Type:.hpp
  1. #ifndef _GREGORIAN_TYPES_HPP__
  2. #define _GREGORIAN_TYPES_HPP__
  3.  
  4. /* Copyright (c) 2002,2003 CrystalClear Software, Inc.
  5.  * Use, modification and distribution is subject to the
  6.  * Boost Software License, Version 1.0. (See accompanying
  7.  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  8.  * Author: Jeff Garland, Bart Garst
  9.  * $Date$
  10.  */
  11.  
  12. /*! @file gregorian_types.hpp
  13.   Single file header that defines most of the types for the gregorian
  14.   date-time system.
  15. */
  16.  
  17. #include "boost/date_time/date.hpp"
  18. #include "boost/date_time/period.hpp"
  19. #include "boost/date_time/gregorian/greg_calendar.hpp"
  20. #include "boost/date_time/gregorian/greg_duration.hpp"
  21. #if defined(BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES)
  22. #include "boost/date_time/gregorian/greg_duration_types.hpp"
  23. #endif
  24. #include "boost/date_time/gregorian/greg_date.hpp"
  25. #include "boost/date_time/date_generators.hpp"
  26. #include "boost/date_time/date_clock_device.hpp"
  27. #include "boost/date_time/date_iterator.hpp"
  28. #include "boost/date_time/adjust_functors.hpp"
  29.  
  30. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost {
  31.  
  32. //! Gregorian date system based on date_time components
  33. /*! This date system defines a full complement of types including
  34.  *  a date, date_duration, date_period, day_clock, and a
  35.  *  day_iterator.
  36.  */
  37. namespace gregorian {
  38.   //! Date periods for the gregorian system
  39.   /*!\ingroup date_basics
  40.    */
  41.   typedef date_time::period<date, date_duration> date_period;  
  42.  
  43.   //! A unifying date_generator base type
  44.   /*! A unifying date_generator base type for:
  45.    * partial_date, nth_day_of_the_week_in_month,
  46.    * first_day_of_the_week_in_month, and last_day_of_the_week_in_month
  47.    */
  48.   typedef date_time::year_based_generator<date> year_based_generator;
  49.  
  50.   //! A date generation object type
  51.   typedef date_time::partial_date<date> partial_date;
  52.  
  53.   typedef date_time::nth_kday_of_month<date> nth_kday_of_month;
  54.   typedef nth_kday_of_month nth_day_of_the_week_in_month;
  55.  
  56.   typedef date_time::first_kday_of_month<date> first_kday_of_month;
  57.   typedef first_kday_of_month first_day_of_the_week_in_month;
  58.  
  59.   typedef date_time::last_kday_of_month<date> last_kday_of_month;
  60.   typedef last_kday_of_month last_day_of_the_week_in_month;
  61.  
  62.   typedef date_time::first_kday_after<date> first_kday_after;
  63.   typedef first_kday_after first_day_of_the_week_after;
  64.  
  65.   typedef date_time::first_kday_before<date> first_kday_before;
  66.   typedef first_kday_before first_day_of_the_week_before;
  67.  
  68.   //! A clock to get the current day from the local computer
  69.   /*!\ingroup date_basics
  70.    */
  71.   typedef date_time::day_clock<date> day_clock;
  72.  
  73.   //! Base date_iterator type for gregorian types.
  74.   /*!\ingroup date_basics
  75.    */
  76.   typedef date_time::date_itr_base<date> date_iterator;
  77.  
  78.   //! A day level iterator
  79.   /*!\ingroup date_basics
  80.    */
  81.   typedef date_time::date_itr<date_time::day_functor<date>,
  82.                               date> day_iterator;
  83.   //! A week level iterator
  84.   /*!\ingroup date_basics
  85.    */
  86.   typedef date_time::date_itr<date_time::week_functor<date>,
  87.                               date> week_iterator;
  88.   //! A month level iterator
  89.   /*!\ingroup date_basics
  90.    */
  91.   typedef date_time::date_itr<date_time::month_functor<date>,
  92.                               date> month_iterator;
  93.   //! A year level iterator
  94.   /*!\ingroup date_basics
  95.    */
  96.   typedef date_time::date_itr<date_time::year_functor<date>,
  97.                               date> year_iterator;
  98.  
  99.   // bring in these date_generator functions from date_time namespace
  100.   using date_time::days_until_weekday;
  101.   using date_time::days_before_weekday;
  102.   using date_time::next_weekday;
  103.   using date_time::previous_weekday;
  104.  
  105. } } //namespace gregorian
  106.  
  107.  
  108.  
  109. #endif
  110.  
downloadgregorian_types.hpp Source code - Download mars Source code
Related Source Codes/Software:
Hero - Elegant transition library for iOS & tvOS 2017-06-09
deep-photo-styletransfer - Code and data for paper "Deep Photo Style Transfer... 2017-06-09
mastodon - A GNU Social-compatible microblogging server ... 2017-06-09
plyr - A simple HTML5, YouTube and Vimeo player ... 2017-06-08
prepack - Prepack is a partial evaluator for JavaScript. Pre... 2017-06-08
Public-APIs - 2017-06-09
lottie-ios - An iOS library to natively render After Effects ve... 2017-06-09
Awesome-Hacking - A collection of various awesome lists for hackers,... 2017-06-09
algorithms - Minimal examples of data structures and algorithms... 2017-06-10
lectures - Oxford Deep NLP 2017 course 2017-06-10
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top