BVB Source Codes

mars Show ptime.hpp Source code

Return Download mars: download ptime.hpp Source code - Download mars Source code - Type:.hpp
  1. #ifndef POSIX_PTIME_HPP___
  2. #define POSIX_PTIME_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
  9.  * $Date$
  10.  */
  11.  
  12. #include "boost/date_time/posix_time/posix_time_system.hpp"
  13. #include "boost/date_time/time.hpp"
  14.  
  15. namespace mars_boost {} namespace boost = mars_boost; namespace mars_boost {
  16.  
  17. namespace posix_time {
  18.  
  19.   //bring special enum values into the namespace
  20.   using date_time::special_values;
  21.   using date_time::not_special;
  22.   using date_time::neg_infin;
  23.   using date_time::pos_infin;
  24.   using date_time::not_a_date_time;
  25.   using date_time::max_date_time;
  26.   using date_time::min_date_time;
  27.  
  28.   //! Time type with no timezone or other adjustments
  29.   /*! \ingroup time_basics
  30.    */
  31.   class ptime : public date_time::base_time<ptime, posix_time_system>
  32.   {
  33.   public:
  34.     typedef posix_time_system time_system_type;
  35.     typedef time_system_type::time_rep_type time_rep_type;
  36.     typedef time_system_type::time_duration_type time_duration_type;
  37.     typedef ptime time_type;
  38.     //! Construct with date and offset in day
  39.     ptime(gregorian::date d,time_duration_type td) : date_time::base_time<time_type,time_system_type>(d,td)
  40.     {}
  41.     //! Construct a time at start of the given day (midnight)
  42.     explicit ptime(gregorian::date d) : date_time::base_time<time_type,time_system_type>(d,time_duration_type(0,0,0))
  43.     {}
  44.     //! Copy from time_rep
  45.     ptime(const time_rep_type& rhs):
  46.       date_time::base_time<time_type,time_system_type>(rhs)
  47.     {}
  48.     //! Construct from special value
  49.     ptime(const special_values sv) : date_time::base_time<time_type,time_system_type>(sv)
  50.     {}
  51. #if !defined(DATE_TIME_NO_DEFAULT_CONSTRUCTOR)
  52.     // Default constructor constructs to not_a_date_time
  53.     ptime() : date_time::base_time<time_type,time_system_type>(gregorian::date(not_a_date_time), time_duration_type(not_a_date_time))
  54.     {}
  55. #endif // DATE_TIME_NO_DEFAULT_CONSTRUCTOR
  56.      
  57.   };
  58.  
  59.  
  60.  
  61. } }//namespace posix_time
  62.  
  63.  
  64. #endif
  65.  
  66.  
downloadptime.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