00001
00002
00003
00004
00005
00006
00007
00008 #ifndef BOOST_LOCALE_INFO_HPP_INCLUDED
00009 #define BOOST_LOCALE_INFO_HPP_INCLUDED
00010 #include <boost/locale/config.hpp>
00011 #ifdef BOOST_MSVC
00012 # pragma warning(push)
00013 # pragma warning(disable : 4275 4251 4231 4660)
00014 #endif
00015 #include <locale>
00016 #include <string>
00017 #include <map>
00018 #include <memory>
00019
00020
00021 namespace boost {
00022 namespace locale {
00023
00024 struct info_impl;
00025
00031 class BOOST_LOCALE_DECL info : public std::locale::facet
00032 {
00033 public:
00034 static std::locale::id id;
00035
00041 info(std::string posix_id,size_t refs = 0);
00042
00047 info(std::string posix_id,std::string encoding,size_t refs = 0);
00048
00049
00050
00054 std::string language() const;
00058 std::string country() const;
00062 std::string variant() const;
00066 std::string encoding() const;
00067
00071 bool utf8() const
00072 {
00073 return utf8_;
00074 }
00075
00076
00078
00079
00080
00081
00082 info_impl const *impl() const
00083 {
00084 return impl_.get();
00085 }
00086
00087 #if defined (__SUNPRO_CC) && defined (_RWSTD_VER)
00088 std::locale::id& __get_id (void) const { return id; }
00089 #endif
00091 protected:
00092
00093 virtual ~info();
00094
00095 private:
00096 std::auto_ptr<info_impl> impl_;
00097 bool utf8_;
00098 };
00099
00100 }
00101 }
00102
00103 #ifdef BOOST_MSVC
00104 #pragma warning(pop)
00105 #endif
00106
00107 #endif
00108
00109