]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/io/unicode/ustream.h
ICU-8.11.tar.gz
[apple/icu.git] / icuSources / io / unicode / ustream.h
index e620da13b728ff578d2f13fdbe9d6f9dcb90f8d2..6f5352f0d54c6afea8785d47f04a6b4cbd01a450 100644 (file)
@@ -1,6 +1,6 @@
 /*
 **********************************************************************
-*   Copyright (C) 2001-2004, International Business Machines
+*   Copyright (C) 2001-2006 International Business Machines
 *   Corporation and others.  All Rights Reserved.
 **********************************************************************
 *  FILE NAME : ustream.h
 
 #include "unicode/unistr.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.
+ * \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>
+#include <istream>
+#include <ostream>
 
 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.
+ * @stable 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.
+ * @stable 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>
+#include <istream.h>
+#include <ostream.h>
 
 U_NAMESPACE_BEGIN
 U_IO_API ostream & U_EXPORT2 operator<<(ostream& stream, const UnicodeString& s);