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