VSM C++ SDK
Vehicle Specific Modules SDK
windows_wstring.h
1 // Copyright (c) 2014, Smart Projects Holdings Ltd
2 // All rights reserved.
3 // See LICENSE file for license details.
4 
5 #ifndef _WINDOWS_WSTRING_H_
6 #define _WINDOWS_WSTRING_H_
7 
8 #include <string>
9 #include <windows.h>
10 #include <ugcs/vsm/exception.h>
11 
12 namespace ugcs {
13 namespace vsm {
14 
17 public:
20 
22  static constexpr size_t MAX_WLEN = 8 * 1024;
23 
26  Windows_wstring(const std::string&);
27 
29  LPCWSTR
30  Get() const;
31 
33  operator LPCWSTR() const;
34 
35 private:
36 
38  WCHAR wchar_str[MAX_WLEN];
39 
40 };
41 
42 } /* namespace vsm */
43 } /* namespace ugcs */
44 
45 #endif /* _WINDOWS_WSTRING_H_ */
UGCS root namespace.
Definition: android-linux/ugcs/vsm/platform_sockets.h:27
Exception class with one parameter.
Definition: exception.h:88
static constexpr size_t MAX_WLEN
Maximum size of Windows wide char string.
Definition: windows_wstring.h:22
LPCWSTR Get() const
Get Windows wide char string.
VSM exceptions definition.
Helper class for constructing Windows API compatible wchar strings from UTF-8 strings.
Definition: windows_wstring.h:16
Windows_wstring(const std::string &)
Construct from UTF-8 string.
#define VSM_DEFINE_EXCEPTION(__exc_class,...)
Define custom exception type.
Definition: exception.h:202