jpayne@69: // © 2016 and later: Unicode, Inc. and others. jpayne@69: // License & terms of use: http://www.unicode.org/copyright.html jpayne@69: /* jpayne@69: ********************************************************************** jpayne@69: * Copyright (C) 2001-2014 International Business Machines jpayne@69: * Corporation and others. All Rights Reserved. jpayne@69: ********************************************************************** jpayne@69: * FILE NAME : ustream.h jpayne@69: * jpayne@69: * Modification History: jpayne@69: * jpayne@69: * Date Name Description jpayne@69: * 06/25/2001 grhoten Move iostream from unistr.h jpayne@69: ****************************************************************************** jpayne@69: */ jpayne@69: jpayne@69: #ifndef USTREAM_H jpayne@69: #define USTREAM_H jpayne@69: jpayne@69: #include "unicode/utypes.h" jpayne@69: jpayne@69: #if U_SHOW_CPLUSPLUS_API jpayne@69: jpayne@69: #include "unicode/unistr.h" jpayne@69: jpayne@69: #if !UCONFIG_NO_CONVERSION // not available without conversion jpayne@69: jpayne@69: /** jpayne@69: * \file jpayne@69: * \brief C++ API: Unicode iostream like API jpayne@69: * jpayne@69: * At this time, this API is very limited. It contains jpayne@69: * operator<< and operator>> for UnicodeString manipulation with the jpayne@69: * C++ I/O stream API. jpayne@69: */ jpayne@69: jpayne@69: #if defined(__GLIBCXX__) jpayne@69: namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364 jpayne@69: #endif jpayne@69: jpayne@69: #include jpayne@69: jpayne@69: U_NAMESPACE_BEGIN jpayne@69: jpayne@69: /** jpayne@69: * Write the contents of a UnicodeString to a C++ ostream. This functions writes jpayne@69: * the characters in a UnicodeString to an ostream. The UChars in the jpayne@69: * UnicodeString are converted to the char based ostream with the default jpayne@69: * converter. jpayne@69: * @stable 3.0 jpayne@69: */ jpayne@69: U_IO_API std::ostream & U_EXPORT2 operator<<(std::ostream& stream, const UnicodeString& s); jpayne@69: jpayne@69: /** jpayne@69: * Write the contents from a C++ istream to a UnicodeString. The UChars in the jpayne@69: * UnicodeString are converted from the char based istream with the default jpayne@69: * converter. jpayne@69: * @stable 3.0 jpayne@69: */ jpayne@69: U_IO_API std::istream & U_EXPORT2 operator>>(std::istream& stream, UnicodeString& s); jpayne@69: U_NAMESPACE_END jpayne@69: jpayne@69: #endif jpayne@69: jpayne@69: /* No operator for UChar because it can conflict with wchar_t */ jpayne@69: jpayne@69: #endif /* U_SHOW_CPLUSPLUS_API */ jpayne@69: jpayne@69: #endif