Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* |
michael@0 | 2 | ********************************************************************** |
michael@0 | 3 | * Copyright (C) 2001-2011 International Business Machines |
michael@0 | 4 | * Corporation and others. All Rights Reserved. |
michael@0 | 5 | ********************************************************************** |
michael@0 | 6 | * FILE NAME : ustream.h |
michael@0 | 7 | * |
michael@0 | 8 | * Modification History: |
michael@0 | 9 | * |
michael@0 | 10 | * Date Name Description |
michael@0 | 11 | * 06/25/2001 grhoten Move iostream from unistr.h |
michael@0 | 12 | ****************************************************************************** |
michael@0 | 13 | */ |
michael@0 | 14 | |
michael@0 | 15 | #ifndef USTREAM_H |
michael@0 | 16 | #define USTREAM_H |
michael@0 | 17 | |
michael@0 | 18 | #include "unicode/unistr.h" |
michael@0 | 19 | |
michael@0 | 20 | /** |
michael@0 | 21 | * \file |
michael@0 | 22 | * \brief C++ API: Unicode iostream like API |
michael@0 | 23 | * |
michael@0 | 24 | * At this time, this API is very limited. It contains |
michael@0 | 25 | * operator<< and operator>> for UnicodeString manipulation with the |
michael@0 | 26 | * C++ I/O stream API. |
michael@0 | 27 | */ |
michael@0 | 28 | |
michael@0 | 29 | #if U_IOSTREAM_SOURCE >= 199711 |
michael@0 | 30 | #if (__GNUC__ == 2) |
michael@0 | 31 | #include <iostream> |
michael@0 | 32 | #else |
michael@0 | 33 | #include <istream> |
michael@0 | 34 | #include <ostream> |
michael@0 | 35 | #endif |
michael@0 | 36 | |
michael@0 | 37 | U_NAMESPACE_BEGIN |
michael@0 | 38 | |
michael@0 | 39 | /** |
michael@0 | 40 | * Write the contents of a UnicodeString to a C++ ostream. This functions writes |
michael@0 | 41 | * the characters in a UnicodeString to an ostream. The UChars in the |
michael@0 | 42 | * UnicodeString are converted to the char based ostream with the default |
michael@0 | 43 | * converter. |
michael@0 | 44 | * @stable 3.0 |
michael@0 | 45 | */ |
michael@0 | 46 | U_IO_API std::ostream & U_EXPORT2 operator<<(std::ostream& stream, const UnicodeString& s); |
michael@0 | 47 | |
michael@0 | 48 | /** |
michael@0 | 49 | * Write the contents from a C++ istream to a UnicodeString. The UChars in the |
michael@0 | 50 | * UnicodeString are converted from the char based istream with the default |
michael@0 | 51 | * converter. |
michael@0 | 52 | * @stable 3.0 |
michael@0 | 53 | */ |
michael@0 | 54 | U_IO_API std::istream & U_EXPORT2 operator>>(std::istream& stream, UnicodeString& s); |
michael@0 | 55 | U_NAMESPACE_END |
michael@0 | 56 | |
michael@0 | 57 | #endif |
michael@0 | 58 | |
michael@0 | 59 | /* No operator for UChar because it can conflict with wchar_t */ |
michael@0 | 60 | |
michael@0 | 61 | #endif |