Debian Codegraph @

intl/icu/source/io/unicode/ustream.h

raw ◀ ▶
1 Debian patch touch this file
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 **********************************************************************
5 * Copyright (C) 2001-2014 International Business Machines
6 * Corporation and others. All Rights Reserved.
7 **********************************************************************
8 * FILE NAME : ustream.h
9 *
10 * Modification History:
11 *
12 * Date Name Description
13 * 06/25/2001 grhoten Move iostream from unistr.h
14 ******************************************************************************
15 */
16
17 #ifndef USTREAM_H
18 #define USTREAM_H
19
20 #include "unicode/utypes.h"
21
22 #if U_SHOW_CPLUSPLUS_API
23
24 #include "unicode/unistr.h"
25
26 #if !UCONFIG_NO_CONVERSION // not available without conversion
27
28 /**
29 * \file
30 * \brief C++ API: Unicode iostream like API
31 *
32 * At this time, this API is very limited. It contains
33 * operator<< and operator>> for UnicodeString manipulation with the
34 * C++ I/O stream API.
35 */
36
37 #include <iostream>
38
39 U_NAMESPACE_BEGIN
40
41 /**
42 * Write the contents of a UnicodeString to a C++ ostream. This functions writes
43 * the characters in a UnicodeString to an ostream. The UChars in the
44 * UnicodeString are converted to the char based ostream with the default
45 * converter.
46 * @stable 3.0
47 */
48 U_IO_API std::ostream & U_EXPORT2 operator<<(std::ostream& stream, const UnicodeString& s);
49
50 /**
51 * Write the contents from a C++ istream to a UnicodeString. The UChars in the
52 * UnicodeString are converted from the char based istream with the default
53 * converter.
54 * @stable 3.0
55 */
56 U_IO_API std::istream & U_EXPORT2 operator>>(std::istream& stream, UnicodeString& s);
57 U_NAMESPACE_END
58
59 #endif
60
61 /* No operator for UChar because it can conflict with wchar_t */
62
63 #endif /* U_SHOW_CPLUSPLUS_API */
64
65 #endif