123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- #ifndef _DATE_TIME_TIME_ZONE_BASE__
- #define _DATE_TIME_TIME_ZONE_BASE__
- #include <string>
- #include <sstream>
- namespace boost {
- namespace date_time {
-
-
- template<typename time_type, typename CharT>
- class time_zone_base {
- public:
- typedef CharT char_type;
- typedef std::basic_string<CharT> string_type;
- typedef std::basic_ostringstream<CharT> stringstream_type;
- typedef typename time_type::date_type::year_type year_type;
- typedef typename time_type::time_duration_type time_duration_type;
- time_zone_base() {};
- virtual ~time_zone_base() {};
-
- virtual string_type dst_zone_abbrev() const=0;
-
- virtual string_type std_zone_abbrev() const=0;
-
- virtual string_type dst_zone_name() const=0;
-
- virtual string_type std_zone_name() const=0;
-
- virtual bool has_dst() const=0;
-
- virtual time_type dst_local_start_time(year_type y) const=0;
-
- virtual time_type dst_local_end_time(year_type y) const=0;
-
- virtual time_duration_type base_utc_offset() const=0;
-
- virtual time_duration_type dst_offset() const=0;
-
- virtual string_type to_posix_string() const =0;
-
- private:
-
- };
-
-
- template<class time_duration_type>
- class dst_adjustment_offsets
- {
- public:
- dst_adjustment_offsets(const time_duration_type& dst_adjust,
- const time_duration_type& dst_start_offset,
- const time_duration_type& dst_end_offset) :
- dst_adjust_(dst_adjust),
- dst_start_offset_(dst_start_offset),
- dst_end_offset_(dst_end_offset)
- {}
-
-
- time_duration_type dst_adjust_;
-
- time_duration_type dst_start_offset_;
-
- time_duration_type dst_end_offset_;
- };
- } }
- #endif
|