00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _STLP_STRING_IO_H
00020 #define _STLP_STRING_IO_H
00021
00022
00023 #if !defined ( _STLP_STRING )
00024 # include <string>
00025 # endif
00026
00027
00028
00029
00030
00031 # ifdef _STLP_DEBUG
00032 # define basic_string _Nondebug_string
00033 # endif
00034
00035
00036 _STLP_BEGIN_NAMESPACE
00037
00038 #if defined (_STLP_USE_NEW_IOSTREAMS)
00039
00040 template <class _CharT, class _Traits, class _Alloc>
00041 basic_ostream<_CharT, _Traits>& _STLP_CALL
00042 operator<<(basic_ostream<_CharT, _Traits>& __os,
00043 const basic_string<_CharT,_Traits,_Alloc>& __s);
00044
00045 template <class _CharT, class _Traits, class _Alloc>
00046 basic_istream<_CharT, _Traits>& _STLP_CALL
00047 operator>>(basic_istream<_CharT, _Traits>& __is,
00048 basic_string<_CharT,_Traits,_Alloc>& __s);
00049
00050 template <class _CharT, class _Traits, class _Alloc>
00051 basic_istream<_CharT, _Traits>& _STLP_CALL
00052 getline(basic_istream<_CharT, _Traits>& __is,
00053 basic_string<_CharT,_Traits,_Alloc>& __s,
00054 _CharT __delim);
00055
00056 # if !(defined (__BORLANDC__) && ! defined (_STLP_USE_OWN_NAMESPACE))
00057
00058 template <class _CharT, class _Traits, class _Alloc>
00059 inline basic_istream<_CharT, _Traits>& _STLP_CALL
00060 getline(basic_istream<_CharT, _Traits>& __is,
00061 basic_string<_CharT,_Traits,_Alloc>& __s)
00062 {
00063 return getline(__is, __s, __is.widen('\n'));
00064 }
00065 # endif
00066
00067 template <class _CharT, class _Traits>
00068 bool _STLP_CALL
00069 __stlp_string_fill(basic_ostream<_CharT, _Traits>& __os,
00070 basic_streambuf<_CharT, _Traits>* __buf,
00071 size_t __n);
00072 #elif ! defined ( _STLP_USE_NO_IOSTREAMS )
00073
00074
00075 # ifdef _WPRTLINK
00076 typedef _WPRTLINK ostream _OSTREAM_DLL;
00077 typedef _WPRTLINK istream _ISTREAM_DLL;
00078 #else
00079 typedef ostream _OSTREAM_DLL;
00080 typedef istream _ISTREAM_DLL;
00081 #endif
00082
00083 template <class _CharT, class _Traits, class _Alloc>
00084 _OSTREAM_DLL& _STLP_CALL operator<<(_OSTREAM_DLL& __os,
00085 const basic_string<_CharT,_Traits,_Alloc>& __s);
00086
00087 template <class _CharT, class _Traits, class _Alloc>
00088 _ISTREAM_DLL& _STLP_CALL operator>>(_ISTREAM_DLL& __is, basic_string<_CharT,_Traits,_Alloc>& __s);
00089
00090 template <class _CharT, class _Traits, class _Alloc>
00091 _ISTREAM_DLL& _STLP_CALL getline(_ISTREAM_DLL& __is,
00092 basic_string<_CharT,_Traits,_Alloc>& __s,
00093 _CharT __delim);
00094
00095
00096 template <class _CharT, class _Traits, class _Alloc>
00097 inline _ISTREAM_DLL& _STLP_CALL
00098 getline(_ISTREAM_DLL& __is, basic_string<_CharT,_Traits,_Alloc>& __s)
00099 {
00100 return getline(__is, __s, '\n');
00101 }
00102
00103 inline void _STLP_CALL
00104 __stlp_string_fill(_OSTREAM_DLL& __os, streambuf* __buf, size_t __n)
00105 {
00106 char __f = __os.fill();
00107 size_t __i;
00108
00109 for (__i = 0; __i < __n; ++__i) __buf->sputc(__f);
00110 }
00111
00112 #endif
00113
00114 _STLP_END_NAMESPACE
00115
00116 # undef basic_string
00117
00118 # if !defined (_STLP_LINK_TIME_INSTANTIATION)
00119 # include <stl/_string_io.c>
00120 # endif
00121
00122 #endif