Last change
on this file since 69 was
29,
checked in by landauf, 17 years ago
|
updated boost from 1_33_1 to 1_34_1
|
File size:
1.1 KB
|
Rev | Line | |
---|
[29] | 1 | // Boost.Filesystem mbpath.hpp ---------------------------------------------// |
---|
| 2 | |
---|
| 3 | // Copyright Beman Dawes 2005 |
---|
| 4 | |
---|
| 5 | // Use, modification, and distribution is subject to the Boost Software |
---|
| 6 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at |
---|
| 7 | // http://www.boost.org/LICENSE_1_0.txt) |
---|
| 8 | |
---|
| 9 | // Encodes wide character paths as MBCS |
---|
| 10 | // See http://../doc/path.htm#mbpath for more information |
---|
| 11 | |
---|
| 12 | #include <boost/filesystem/path.hpp> |
---|
| 13 | #include <string> |
---|
| 14 | #include <locale> |
---|
| 15 | |
---|
| 16 | namespace user |
---|
| 17 | { |
---|
| 18 | struct mbpath_traits; |
---|
| 19 | |
---|
| 20 | typedef boost::filesystem::basic_path<std::wstring, mbpath_traits> mbpath; |
---|
| 21 | |
---|
| 22 | struct mbpath_traits |
---|
| 23 | { |
---|
| 24 | typedef std::wstring internal_string_type; |
---|
| 25 | typedef std::string external_string_type; |
---|
| 26 | |
---|
| 27 | static external_string_type to_external( const mbpath & ph, |
---|
| 28 | const internal_string_type & src ); |
---|
| 29 | |
---|
| 30 | static internal_string_type to_internal( const external_string_type & src ); |
---|
| 31 | |
---|
| 32 | static void imbue( const std::locale & loc ); |
---|
| 33 | }; |
---|
| 34 | } // namespace user |
---|
| 35 | |
---|
| 36 | namespace boost |
---|
| 37 | { |
---|
| 38 | namespace filesystem |
---|
| 39 | { |
---|
| 40 | template<> struct is_basic_path<user::mbpath> |
---|
| 41 | { static const bool value = true; }; |
---|
| 42 | } |
---|
| 43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.