2001-08-30 01:58:44 +00:00
|
|
|
/*
|
|
|
|
**********************************************************************
|
|
|
|
* Copyright (C) 2001, 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"
|
|
|
|
|
2001-10-09 18:20:05 +00:00
|
|
|
U_NAMESPACE_USE
|
|
|
|
|
2001-08-30 01:58:44 +00:00
|
|
|
// for unistrm.h
|
|
|
|
/**
|
|
|
|
* Write the contents of a UnicodeString to an ostream. This functions writes
|
|
|
|
* the characters in a UnicodeString to an ostream. The UChars in the
|
|
|
|
* UnicodeString are truncated to char, leading to undefined results with
|
|
|
|
* anything not in the Latin1 character set.
|
|
|
|
*/
|
|
|
|
#if U_IOSTREAM_SOURCE >= 199711
|
|
|
|
#include <iostream>
|
2001-08-30 03:29:14 +00:00
|
|
|
U_USTDIO_API std::ostream &operator<<(std::ostream& stream, const UnicodeString& s);
|
2002-02-23 00:34:39 +00:00
|
|
|
U_USTDIO_API std::ostream &operator<<(std::ostream& stream, const UChar *s);
|
|
|
|
|
|
|
|
U_USTDIO_API std::istream &operator>>(std::istream& stream, UnicodeString& s);
|
|
|
|
/*U_USTDIO_API std::istream &operator>>(std::istream& stream, UChar *s);*/
|
2001-08-30 01:58:44 +00:00
|
|
|
#elif U_IOSTREAM_SOURCE >= 198506
|
|
|
|
#include <iostream.h>
|
2001-08-30 03:29:14 +00:00
|
|
|
U_USTDIO_API ostream &operator<<(ostream& stream, const UnicodeString& s);
|
2002-02-23 00:34:39 +00:00
|
|
|
U_USTDIO_API ostream &operator<<(ostream& stream, const UChar *s);
|
|
|
|
|
|
|
|
U_USTDIO_API istream &operator>>(istream& stream, UnicodeString& s);
|
|
|
|
/*U_USTDIO_API istream &operator>>(istream& stream, UChar *s);*/
|
2001-08-30 01:58:44 +00:00
|
|
|
#endif
|
|
|
|
|
2002-02-23 00:34:39 +00:00
|
|
|
/* TODO: We should add the operator<< and the operator>> for UDate. */
|
2001-08-30 01:58:44 +00:00
|
|
|
|
|
|
|
#endif
|