diff options
Diffstat (limited to 'cpp/include/Ice/StringConverter.h')
-rw-r--r-- | cpp/include/Ice/StringConverter.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/cpp/include/Ice/StringConverter.h b/cpp/include/Ice/StringConverter.h index 2012a5173b3..d1b48b97072 100644 --- a/cpp/include/Ice/StringConverter.h +++ b/cpp/include/Ice/StringConverter.h @@ -17,34 +17,65 @@ 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; } |