2017-01-20 00:20:31 +00:00
|
|
|
// © 2016 and later: Unicode, Inc. and others.
|
2016-06-15 18:58:17 +00:00
|
|
|
// License & terms of use: http://www.unicode.org/copyright.html
|
2001-08-30 01:58:44 +00:00
|
|
|
/*
|
|
|
|
**********************************************************************
|
2016-05-31 21:45:07 +00:00
|
|
|
* Copyright (C) 2001-2014 International Business Machines
|
|
|
|
* Corporation and others. All Rights Reserved.
|
2001-08-30 01:58:44 +00:00
|
|
|
**********************************************************************
|
|
|
|
* FILE NAME : ustream.h
|
|
|
|
*
|
|
|
|
* Modification History:
|
|
|
|
*
|
|
|
|
* Date Name Description
|
|
|
|
* 06/25/2001 grhoten Move iostream from unistr.h
|
|
|
|
******************************************************************************
|
|
|
|
*/
|
2010-08-25 22:28:32 +00:00
|
|
|
|
2001-08-30 01:58:44 +00:00
|
|
|
#ifndef USTREAM_H
|
|
|
|
#define USTREAM_H
|
|
|
|
|
|
|
|
#include "unicode/unistr.h"
|
|
|
|
|
2014-09-05 21:27:11 +00:00
|
|
|
#if !UCONFIG_NO_CONVERSION // not available without conversion
|
|
|
|
|
2001-08-30 01:58:44 +00:00
|
|
|
/**
|
2005-06-15 05:53:48 +00:00
|
|
|
* \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.
|
2001-08-30 01:58:44 +00:00
|
|
|
*/
|
2005-06-15 05:53:48 +00:00
|
|
|
|
2016-11-15 21:02:48 +00:00
|
|
|
#if defined(__GLIBCXX__)
|
2014-03-07 00:30:23 +00:00
|
|
|
namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364
|
|
|
|
#endif
|
2014-03-06 19:39:41 +00:00
|
|
|
|
2010-08-25 22:28:32 +00:00
|
|
|
#include <iostream>
|
2002-02-23 00:34:39 +00:00
|
|
|
|
2004-02-13 05:35:00 +00:00
|
|
|
U_NAMESPACE_BEGIN
|
2005-06-15 05:53:48 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
2006-07-31 21:09:28 +00:00
|
|
|
* @stable 3.0
|
2005-06-15 05:53:48 +00:00
|
|
|
*/
|
2004-03-15 05:50:27 +00:00
|
|
|
U_IO_API std::ostream & U_EXPORT2 operator<<(std::ostream& stream, const UnicodeString& s);
|
2004-02-13 05:35:00 +00:00
|
|
|
|
2005-06-15 05:53:48 +00:00
|
|
|
/**
|
|
|
|
* 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.
|
2006-07-31 21:09:28 +00:00
|
|
|
* @stable 3.0
|
2005-06-15 05:53:48 +00:00
|
|
|
*/
|
2004-03-15 05:50:27 +00:00
|
|
|
U_IO_API std::istream & U_EXPORT2 operator>>(std::istream& stream, UnicodeString& s);
|
2004-02-13 05:35:00 +00:00
|
|
|
U_NAMESPACE_END
|
|
|
|
|
2001-08-30 01:58:44 +00:00
|
|
|
#endif
|
|
|
|
|
2002-03-01 23:10:26 +00:00
|
|
|
/* No operator for UChar because it can conflict with wchar_t */
|
2001-08-30 01:58:44 +00:00
|
|
|
|
|
|
|
#endif
|