| 60 | }; |
| 61 | |
| 62 | class WStr |
| 63 | { |
| 64 | public: |
| 65 | explicit WStr(const std::string& s) : |
| 66 | m_str(Win32::MultiByteToWideChar(s)) |
| 67 | { |
| 68 | } |
| 69 | |
| 70 | explicit WStr(const std::wstring& s) : |
| 71 | m_str(s) |
| 72 | { |
| 73 | } |
| 74 | |
| 75 | std::wstring str() const |
| 76 | { |
| 77 | return m_str; |
| 78 | } |
| 79 | |
| 80 | const wchar_t* c_str() const |
| 81 | { |
| 82 | return m_str.c_str(); |
| 83 | } |
| 84 | |
| 85 | operator std::wstring() const |
| 86 | { |
| 87 | return m_str; |
| 88 | } |
| 89 | |
| 90 | operator const wchar_t*() const |
| 91 | { |
| 92 | return m_str.c_str(); |
| 93 | } |
| 94 | |
| 95 | private: |
| 96 | std::wstring m_str; |
| 97 | }; |
| 98 | |
| 99 | } // namespace fusion |