File: StringConverter.h

package info (click to toggle)
zeroc-ice 3.7.8-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 82,840 kB
  • sloc: cpp: 360,403; java: 226,078; cs: 102,261; javascript: 35,028; python: 28,875; objc: 27,050; php: 7,543; ruby: 7,190; yacc: 2,946; ansic: 2,490; xml: 1,599; lex: 1,241; makefile: 465; sh: 52
file content (78 lines) | stat: -rw-r--r-- 2,258 bytes parent folder | download | duplicates (4)
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