1*c2c66affSColin Finck /*
2*c2c66affSColin Finck * Copyright (c) 1997-1999
3*c2c66affSColin Finck * Silicon Graphics Computer Systems, Inc.
4*c2c66affSColin Finck *
5*c2c66affSColin Finck * Copyright (c) 1999
6*c2c66affSColin Finck * Boris Fomitchev
7*c2c66affSColin Finck *
8*c2c66affSColin Finck * This material is provided "as is", with absolutely no warranty expressed
9*c2c66affSColin Finck * or implied. Any use is at your own risk.
10*c2c66affSColin Finck *
11*c2c66affSColin Finck * Permission to use or copy this software for any purpose is hereby granted
12*c2c66affSColin Finck * without fee, provided the above notices are retained on all copies.
13*c2c66affSColin Finck * Permission to modify the code and to distribute modified code is granted,
14*c2c66affSColin Finck * provided the above notices are retained, and a notice that the code was
15*c2c66affSColin Finck * modified is included with the above copyright notice.
16*c2c66affSColin Finck *
17*c2c66affSColin Finck */
18*c2c66affSColin Finck
19*c2c66affSColin Finck #ifndef _STLP_STRING_IO_H
20*c2c66affSColin Finck #define _STLP_STRING_IO_H
21*c2c66affSColin Finck
22*c2c66affSColin Finck #ifndef _STLP_INTERNAL_OSTREAM_H
23*c2c66affSColin Finck # include <stl/_ostream.h>
24*c2c66affSColin Finck #endif
25*c2c66affSColin Finck
26*c2c66affSColin Finck #ifndef _STLP_INTERNAL_ISTREAM
27*c2c66affSColin Finck # include <stl/_istream.h>
28*c2c66affSColin Finck #endif
29*c2c66affSColin Finck
30*c2c66affSColin Finck // I/O.
31*c2c66affSColin Finck _STLP_BEGIN_NAMESPACE
32*c2c66affSColin Finck
33*c2c66affSColin Finck template <class _CharT, class _Traits, class _Alloc>
34*c2c66affSColin Finck basic_ostream<_CharT, _Traits>& _STLP_CALL
35*c2c66affSColin Finck operator<<(basic_ostream<_CharT, _Traits>& __os,
36*c2c66affSColin Finck const basic_string<_CharT,_Traits,_Alloc>& __s);
37*c2c66affSColin Finck
38*c2c66affSColin Finck #if defined (_STLP_USE_TEMPLATE_EXPRESSION)
39*c2c66affSColin Finck
40*c2c66affSColin Finck template <class _CharT, class _Traits, class _Alloc, class _Left, class _Right, class _StorageDir>
41*c2c66affSColin Finck basic_ostream<_CharT, _Traits>& _STLP_CALL
42*c2c66affSColin Finck operator<<(basic_ostream<_CharT, _Traits>& __os,
43*c2c66affSColin Finck const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __sum) {
44*c2c66affSColin Finck basic_string<_CharT, _Traits, _Alloc> __tmp(__sum);
45*c2c66affSColin Finck return __os << __tmp;
46*c2c66affSColin Finck }
47*c2c66affSColin Finck
48*c2c66affSColin Finck #endif /* _STLP_USE_TEMPLATE_EXPRESSION */
49*c2c66affSColin Finck
50*c2c66affSColin Finck template <class _CharT, class _Traits, class _Alloc>
51*c2c66affSColin Finck basic_istream<_CharT, _Traits>& _STLP_CALL
52*c2c66affSColin Finck operator>>(basic_istream<_CharT, _Traits>& __is,
53*c2c66affSColin Finck basic_string<_CharT,_Traits,_Alloc>& __s);
54*c2c66affSColin Finck
55*c2c66affSColin Finck template <class _CharT, class _Traits, class _Alloc>
56*c2c66affSColin Finck basic_istream<_CharT, _Traits>& _STLP_CALL
57*c2c66affSColin Finck getline(basic_istream<_CharT, _Traits>& __is,
58*c2c66affSColin Finck basic_string<_CharT,_Traits,_Alloc>& __s,
59*c2c66affSColin Finck _CharT __delim);
60*c2c66affSColin Finck
61*c2c66affSColin Finck #if !(defined (__BORLANDC__) && !defined (_STLP_USE_OWN_NAMESPACE))
62*c2c66affSColin Finck
63*c2c66affSColin Finck template <class _CharT, class _Traits, class _Alloc>
64*c2c66affSColin Finck inline basic_istream<_CharT, _Traits>& _STLP_CALL
getline(basic_istream<_CharT,_Traits> & __is,basic_string<_CharT,_Traits,_Alloc> & __s)65*c2c66affSColin Finck getline(basic_istream<_CharT, _Traits>& __is,
66*c2c66affSColin Finck basic_string<_CharT,_Traits,_Alloc>& __s) {
67*c2c66affSColin Finck return getline(__is, __s, __is.widen('\n'));
68*c2c66affSColin Finck }
69*c2c66affSColin Finck #endif
70*c2c66affSColin Finck
71*c2c66affSColin Finck _STLP_END_NAMESPACE
72*c2c66affSColin Finck
73*c2c66affSColin Finck #if !defined (_STLP_LINK_TIME_INSTANTIATION)
74*c2c66affSColin Finck # include <stl/_string_io.c>
75*c2c66affSColin Finck #endif
76*c2c66affSColin Finck
77*c2c66affSColin Finck #endif /* _STLP_STRING_IO_H */
78