summaryrefslogtreecommitdiff
path: root/cpp/include/Ice/StringConverter.h
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-08-01 10:09:48 -0400
committerBernard Normier <bernard@zeroc.com>2016-08-01 10:09:48 -0400
commit4aa7ae5129a9cb66f5ea26165310e96603af576c (patch)
treef8ee6859ad547b59cc28eadb1212f403f51dfff7 /cpp/include/Ice/StringConverter.h
parentDo not initialize OpenSSL locks if already done by other library. (diff)
downloadice-4aa7ae5129a9cb66f5ea26165310e96603af576c.tar.bz2
ice-4aa7ae5129a9cb66f5ea26165310e96603af576c.tar.xz
ice-4aa7ae5129a9cb66f5ea26165310e96603af576c.zip
Move StringConverter API to namespace Ice
Diffstat (limited to 'cpp/include/Ice/StringConverter.h')
-rw-r--r--cpp/include/Ice/StringConverter.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/cpp/include/Ice/StringConverter.h b/cpp/include/Ice/StringConverter.h
new file mode 100644
index 00000000000..ac002394a21
--- /dev/null
+++ b/cpp/include/Ice/StringConverter.h
@@ -0,0 +1,55 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef ICE_STRING_CONVERTER_H
+#define ICE_STRING_CONVERTER_H
+
+#include <Ice/Config.h>
+#include <IceUtil/StringConverter.h>
+
+namespace Ice
+{
+
+typedef IceUtil::UTF8Buffer UTF8Buffer;
+typedef IceUtil::StringConverter StringConverter;
+typedef IceUtil::StringConverterPtr StringConverterPtr;
+typedef IceUtil::WstringConverter WstringConverter;
+typedef IceUtil::WstringConverterPtr WstringConverterPtr;
+
+typedef IceUtil::IllegalConversionException IllegalConversionException;
+
+#ifdef ICE_CPP11_MAPPING
+template<typename charT>
+using BasicStringConverter = IceUtil::BasicStringConverter<charT>;
+#endif
+
+#ifdef _WIN32
+//
+// Create a StringConverter that converts to and from narrow chars
+// in the given code page, using MultiByteToWideChar and WideCharToMultiByte
+//
+ICE_API StringConverterPtr createWindowsStringConverter(unsigned int);
+#endif
+
+using IceUtil::createUnicodeWstringConverter;
+
+using IceUtil::setProcessStringConverter;
+using IceUtil::getProcessStringConverter;
+using IceUtil::setProcessWstringConverter;
+using IceUtil::getProcessWstringConverter;
+
+using IceUtil::wstringToString;
+using IceUtil::stringToWstring;
+
+using IceUtil::nativeToUTF8;
+using IceUtil::UTF8ToNative;
+
+}
+
+#endif