00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00034 #ifndef UNI_STRING_H_INCLUDED
00035 #define UNI_STRING_H_INCLUDED
00036
00037 #include <string>
00038 #include <sstream>
00039 #include <fstream>
00040
00041 namespace hwdet
00042 {
00043
00044
00045 #if defined UNICODE && defined _WINDOWS
00046
00047
00049 typedef ::std::wstring String;
00050
00052 typedef ::std::wstringstream StringStream;
00053
00055 typedef ::std::wistringstream IStringStream;
00056
00058 typedef ::std::wostringstream OStringStream;
00059
00061 typedef ::std::wfstream FStream;
00062
00064 typedef ::std::wifstream IFStream;
00065
00067 typedef ::std::wofstream OFStream;
00068
00070 typedef ::std::wistream IStream;
00071
00073 typedef ::std::wostream OStream;
00074
00076 typedef ::std::wiostream IOStream;
00077
00079 extern std::wostream &Cout;
00080
00082 extern std::wostream &Cerr;
00083
00085 extern std::wistream &Cin;
00086
00088 typedef wchar_t Char;
00089
00091 #define TXT(text) L##text
00092
00093 #else
00094
00095
00097 typedef ::std::string String;
00098
00100 typedef ::std::stringstream StringStream;
00101
00103 typedef ::std::istringstream IStringStream;
00104
00106 typedef ::std::ostringstream OStringStream;
00107
00109 typedef ::std::fstream FStream;
00110
00112 typedef ::std::ifstream IFStream;
00113
00115 typedef ::std::ofstream OFStream;
00116
00118 typedef ::std::ostream OStream;
00119
00121 typedef ::std::istream IStream;
00122
00124 typedef ::std::iostream IOStream;
00125
00127 extern std::ostream &Cout;
00128
00130 extern std::ostream &Cerr;
00131
00133 extern std::istream &Cin;
00134
00136 typedef char Char;
00137
00139 #define TXT(text) text
00140
00141 #endif
00142
00143 #ifdef _WINDOWS
00144
00145
00146
00148 std::string Win_UnicodeToANSI(std::wstring unicode);
00149
00151 std::wstring Win_ANSIToUnicode(std::string ansi);
00152 #endif
00153
00154 }
00155
00156 #endif