1 //
2 //  Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
3 //
4 //  Distributed under the Boost Software License, Version 1.0. (See
5 //  accompanying file LICENSE_1_0.txt or copy at
6 //  http://www.boost.org/LICENSE_1_0.txt)
7 //
8 #ifndef BOOST_LOCALE_IMPL_UTIL_LOCALE_DATA_HPP
9 #define BOOST_LOCALE_IMPL_UTIL_LOCALE_DATA_HPP
10 
11 #include <string>
12 
13 namespace boost {
14     namespace locale {
15         namespace util {
16 
17             class locale_data {
18             public:
locale_data()19                 locale_data() :
20                     language("C"),
21                     encoding("us-ascii"),
22                     utf8(false)
23                 {
24                 }
25 
26                 std::string language;
27                 std::string country;
28                 std::string variant;
29                 std::string encoding;
30                 bool utf8;
31 
32                 void parse(std::string const &locale_name);
33 
34             private:
35 
36                 void parse_from_lang(std::string const &locale_name);
37                 void parse_from_country(std::string const &locale_name);
38                 void parse_from_encoding(std::string const &locale_name);
39                 void parse_from_variant(std::string const &locale_name);
40             };
41 
42         } // util
43     } // locale
44 } // boost
45 
46 #endif
47 // vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
48