]> git.saurik.com Git - apple/icu.git/blob - icuSources/io/unicode/ustream.h
ICU-6.2.4.tar.gz
[apple/icu.git] / icuSources / io / unicode / ustream.h
1 /*
2 **********************************************************************
3 * Copyright (C) 2001-2004, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 **********************************************************************
6 * FILE NAME : ustream.h
7 *
8 * Modification History:
9 *
10 * Date Name Description
11 * 06/25/2001 grhoten Move iostream from unistr.h
12 ******************************************************************************
13 */
14
15 #ifndef USTREAM_H
16 #define USTREAM_H
17
18 #include "unicode/unistr.h"
19
20
21 /**
22 * Write the contents of a UnicodeString to an ostream. This functions writes
23 * the characters in a UnicodeString to an ostream. The UChars in the
24 * UnicodeString are truncated to char, leading to undefined results with
25 * anything not in the Latin1 character set.
26 */
27 #if U_IOSTREAM_SOURCE >= 199711
28 #include <iostream>
29
30 U_NAMESPACE_BEGIN
31 U_IO_API std::ostream & U_EXPORT2 operator<<(std::ostream& stream, const UnicodeString& s);
32
33 U_IO_API std::istream & U_EXPORT2 operator>>(std::istream& stream, UnicodeString& s);
34 U_NAMESPACE_END
35
36 #elif U_IOSTREAM_SOURCE >= 198506
37 #include <iostream.h>
38
39 U_NAMESPACE_BEGIN
40 U_IO_API ostream & U_EXPORT2 operator<<(ostream& stream, const UnicodeString& s);
41
42 U_IO_API istream & U_EXPORT2 operator>>(istream& stream, UnicodeString& s);
43 U_NAMESPACE_END
44
45 #endif
46
47 /* No operator for UChar because it can conflict with wchar_t */
48
49 #endif