00001
00002
00003
00004
00005
00006
00007
00008 #ifndef BOOST_LOCALE_TIMEZONE_HPP_INCLUDED
00009 #define BOOST_LOCALE_TIMEZONE_HPP_INCLUDED
00010
00011 #include <boost/locale/config.hpp>
00012 #ifdef BOOST_MSVC
00013 # pragma warning(push)
00014 # pragma warning(disable : 4275 4251 4231 4660)
00015 #endif
00016 #include <string>
00017 #include <set>
00018 #include <ostream>
00019 #include <memory>
00020
00021
00022
00023 namespace boost {
00024 namespace locale {
00025
00026 class time_zone_impl;
00031
00038 class BOOST_LOCALE_DECL time_zone {
00039 public:
00040
00044 static std::set<std::string> all_zones();
00045
00052 static void global(time_zone const &zone);
00053
00057 time_zone();
00058
00062 time_zone(time_zone const &other);
00066 time_zone const &operator=(time_zone const &other);
00067
00068 ~time_zone();
00072 time_zone(std::string const &id);
00073
00077 bool operator==(time_zone const &other) const;
00078
00082 bool operator!=(time_zone const &other) const
00083 {
00084 return !(*this==other);
00085 }
00086
00090 std::string id() const;
00091
00096 double offset_from_gmt(double time,bool is_local_time = false) const;
00097
00098
00100
00101
00102
00103
00104
00105 time_zone_impl *impl() const
00106 {
00107 return impl_.get();
00108 }
00109
00111 private:
00112 std::auto_ptr<time_zone_impl> impl_;
00113 };
00114
00119 template<typename CharType>
00120 std::basic_ostream<CharType> &operator<<(std::basic_ostream<CharType> &out,time_zone const &tz);
00121
00122
00124 template<>
00125 BOOST_LOCALE_DECL std::basic_ostream<char> &operator<<(std::basic_ostream<char> &out,time_zone const &tz);
00126
00127 #ifndef BOOST_NO_STD_WSTRING
00128 template<>
00129 BOOST_LOCALE_DECL std::basic_ostream<wchar_t> &operator<<(std::basic_ostream<wchar_t> &out,time_zone const &tz);
00130 #endif
00131
00132 #ifdef BOOST_HAS_CHAR16_T
00133 template<>
00134 BOOST_LOCALE_DECL std::basic_ostream<char16_t> &operator<<(std::basic_ostream<char16_t> &out,time_zone const &tz);
00135 #endif
00136
00137 #ifdef BOOST_HAS_CHAR32_T
00138 template<>
00139 BOOST_LOCALE_DECL std::basic_ostream<char32_t> &operator<<(std::basic_ostream<char32_t> &out,time_zone const &tz);
00140 #endif
00142
00146
00147 }
00148 }
00149
00150 #ifdef BOOST_MSVC
00151 #pragma warning(pop)
00152 #endif
00153
00154
00155 #endif
00156