blob: 025063c845f3185ab5c0d5e7fbce1ff469610bc0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
#ifndef ICE_STRING_CONVERTER_H
#define ICE_STRING_CONVERTER_H
#include <Ice/Config.h>
#include <IceUtil/StringConverter.h>
#include <IceUtil/ConsoleUtil.h>
namespace Ice
{
/** Encapsulates bytes in the UTF-8 encoding. */
typedef IceUtil::UTF8Buffer UTF8Buffer;
/** Narrow string converter. */
typedef IceUtil::StringConverter StringConverter;
typedef IceUtil::StringConverterPtr StringConverterPtr;
/** Wide string converter. */
typedef IceUtil::WstringConverter WstringConverter;
typedef IceUtil::WstringConverterPtr WstringConverterPtr;
/** Indicates an error occurred during string conversion. */
typedef IceUtil::IllegalConversionException IllegalConversionException;
#ifdef ICE_CPP11_MAPPING
/** Base class for a string converter. */
template<typename charT>
using BasicStringConverter = IceUtil::BasicStringConverter<charT>;
#endif
#ifdef _WIN32
/**
* Creates a string converter that converts between multi-byte and UTF-8 strings and uses MultiByteToWideChar
* and WideCharToMultiByte for its implementation.
*/
using IceUtil::createWindowsStringConverter;
#endif
/** Creates a string converter that converts between Unicode wide strings and UTF-8 strings. */
using IceUtil::createUnicodeWstringConverter;
/** Installs a default narrow string converter for the process. */
using IceUtil::setProcessStringConverter;
/** Obtains the default narrow string converter for the process. */
using IceUtil::getProcessStringConverter;
/** Installs a default wide string converter for the process. */
using IceUtil::setProcessWstringConverter;
/** Obtains the default wide string converter for the process. */
using IceUtil::getProcessWstringConverter;
/** Converts a wide string to a narrow string. */
using IceUtil::wstringToString;
/** Converts a narrow string to a wide string. */
using IceUtil::stringToWstring;
/**
* Converts a narrow string to a UTF-8 encoded string using a string converter.
* No conversion is performed if the string converter is nil.
*/
using IceUtil::nativeToUTF8;
/**
* Converts a UTF-8 encoded string to a narrow string using a string converter.
* No conversion is performed if the string converter is nil.
*/
using IceUtil::UTF8ToNative;
}
#endif
|