File indexing completed on 2025-01-18 09:30:40
0001 #ifndef _DATE_TIME_TIME_ZONE_BASE__
0002 #define _DATE_TIME_TIME_ZONE_BASE__
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <string>
0013 #include <sstream>
0014 #include <boost/date_time/compiler_config.hpp>
0015
0016 namespace boost {
0017 namespace date_time {
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 template<typename time_type, typename CharT>
0035 class BOOST_SYMBOL_VISIBLE time_zone_base {
0036 public:
0037 typedef CharT char_type;
0038 typedef std::basic_string<CharT> string_type;
0039 typedef std::basic_ostringstream<CharT> stringstream_type;
0040 typedef typename time_type::date_type::year_type year_type;
0041 typedef typename time_type::time_duration_type time_duration_type;
0042
0043 time_zone_base() {}
0044 virtual ~time_zone_base() {}
0045
0046 virtual string_type dst_zone_abbrev() const=0;
0047
0048 virtual string_type std_zone_abbrev() const=0;
0049
0050 virtual string_type dst_zone_name() const=0;
0051
0052 virtual string_type std_zone_name() const=0;
0053
0054 virtual bool has_dst() const=0;
0055
0056 virtual time_type dst_local_start_time(year_type y) const=0;
0057
0058 virtual time_type dst_local_end_time(year_type y) const=0;
0059
0060 virtual time_duration_type base_utc_offset() const=0;
0061
0062 virtual time_duration_type dst_offset() const=0;
0063
0064 virtual string_type to_posix_string() const =0;
0065
0066 private:
0067
0068 };
0069
0070
0071
0072
0073
0074
0075 template<class time_duration_type>
0076 class dst_adjustment_offsets
0077 {
0078 public:
0079 dst_adjustment_offsets(const time_duration_type& dst_adjust,
0080 const time_duration_type& dst_start_offset,
0081 const time_duration_type& dst_end_offset) :
0082 dst_adjust_(dst_adjust),
0083 dst_start_offset_(dst_start_offset),
0084 dst_end_offset_(dst_end_offset)
0085 {}
0086
0087
0088 time_duration_type dst_adjust_;
0089
0090 time_duration_type dst_start_offset_;
0091
0092 time_duration_type dst_end_offset_;
0093 };
0094
0095
0096 } }
0097
0098
0099
0100 #endif