michael@0: /* michael@0: ********************************************************************** michael@0: * Copyright (C) 2001-2011 International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: ********************************************************************** michael@0: * FILE NAME : ustream.h michael@0: * michael@0: * Modification History: michael@0: * michael@0: * Date Name Description michael@0: * 06/25/2001 grhoten Move iostream from unistr.h michael@0: ****************************************************************************** michael@0: */ michael@0: michael@0: #ifndef USTREAM_H michael@0: #define USTREAM_H michael@0: michael@0: #include "unicode/unistr.h" michael@0: michael@0: /** michael@0: * \file michael@0: * \brief C++ API: Unicode iostream like API michael@0: * michael@0: * At this time, this API is very limited. It contains michael@0: * operator<< and operator>> for UnicodeString manipulation with the michael@0: * C++ I/O stream API. michael@0: */ michael@0: michael@0: #if U_IOSTREAM_SOURCE >= 199711 michael@0: #if (__GNUC__ == 2) michael@0: #include michael@0: #else michael@0: #include michael@0: #include michael@0: #endif michael@0: michael@0: U_NAMESPACE_BEGIN michael@0: michael@0: /** michael@0: * Write the contents of a UnicodeString to a C++ ostream. This functions writes michael@0: * the characters in a UnicodeString to an ostream. The UChars in the michael@0: * UnicodeString are converted to the char based ostream with the default michael@0: * converter. michael@0: * @stable 3.0 michael@0: */ michael@0: U_IO_API std::ostream & U_EXPORT2 operator<<(std::ostream& stream, const UnicodeString& s); michael@0: michael@0: /** michael@0: * Write the contents from a C++ istream to a UnicodeString. The UChars in the michael@0: * UnicodeString are converted from the char based istream with the default michael@0: * converter. michael@0: * @stable 3.0 michael@0: */ michael@0: U_IO_API std::istream & U_EXPORT2 operator>>(std::istream& stream, UnicodeString& s); michael@0: U_NAMESPACE_END michael@0: michael@0: #endif michael@0: michael@0: /* No operator for UChar because it can conflict with wchar_t */ michael@0: michael@0: #endif