Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
_stringio.h
Go to the documentation of this file.
1// -*- C++ -*-
2
33#if __GNUG__ >= 3
34# pragma GCC system_header
35#endif // gcc >= 3
36
37#ifndef _RWSTD_RW_STRINGIO_H_INCLUDED
38#define _RWSTD_RW_STRINGIO_H_INCLUDED
39
40
42
43
45template<class _CharT, class _Traits, class _Allocator>
46basic_istream<_CharT, _Traits>&
47operator>> (basic_istream<_CharT, _Traits>&,
48 basic_string<_CharT, _Traits, _Allocator>&);
49
50
52template<class _CharT, class _Traits, class _Allocator>
53basic_istream<_CharT, _Traits>&
54getline (basic_istream<_CharT, _Traits>&,
55 basic_string<_CharT, _Traits, _Allocator>&,
56 _CharT);
57
58
59template<class _CharT, class _Traits, class _Allocator>
60inline basic_istream<_CharT, _Traits>&
61getline (basic_istream<_CharT, _Traits>& __is,
62 basic_string<_CharT, _Traits, _Allocator>& __str);
63
64
65template<class _CharT, class _Traits, class _Allocator>
66inline basic_ostream<_CharT, _Traits>&
67operator<< (basic_ostream<_CharT, _Traits>&,
68 const basic_string<_CharT, _Traits, _Allocator>&);
69
70
71} // namespace std
72
73
74#endif // _RWSTD_RW_STRINGIO_H_INCLUDED
75
76
77#if !defined (_RWSTD_STRING_INSERTER_INCLUDED) \
78 && defined (_RWSTD_INCLUDE_STRING_INSERTER)
79# define _RWSTD_STRING_INSERTER_INCLUDED
80
82
83template<class _CharT, class _Traits, class _Allocator>
84inline basic_ostream<_CharT, _Traits>&
85operator<< (basic_ostream<_CharT, _Traits>& __os,
86 const basic_string<_CharT, _Traits, _Allocator>& __str)
87{
88 return _RW::__rw_insert (__os, __str.data (), __str.length (),
89 __os.width ());
90}
91
92} // namespace std
93
94#endif // !_RWSTD_STRING_INSERTER_INCLUDED
95
96
97#if !defined (_RWSTD_STRING_EXTRACTORS_INCLUDED) \
98 && defined (_RWSTD_INCLUDE_STRING_EXTRACTORS)
99# define _RWSTD_STRING_EXTRACTORS_INCLUDED
100
101
103
104template<class _CharT, class _Traits, class _Allocator>
105inline basic_istream<_CharT, _Traits>&
106getline (basic_istream<_CharT, _Traits>& __is,
107 basic_string<_CharT, _Traits, _Allocator>& __str)
108{
109 return getline (__is, __str, __is.widen ('\n'));
110}
111
112} // namespace std
113
114
115# if _RWSTD_DEFINE_TEMPLATE_FIRST (_BASIC_ISTREAM)
116# include <rw/_stringio.cc>
117# endif // _RWSTD_DEFINE_TEMPLATE_FIRST (_BASIC_ISTREAM)
118
119
120#ifdef _RWSTD_MSVC
121# pragma warning (push)
122# pragma warning (disable: 4231)
123#endif // _RWSTD_MSVC
124
125
127
128#if _RWSTD_INSTANTIATE (_BASIC_ISTREAM, _CHAR)
129
131 operator>> (istream&, string&));
132
134 getline (istream&, string&, char));
135
136#endif // _RWSTD_INSTANTIATE (_BASIC_ISTREAM, _CHAR)
137
138#if _RWSTD_INSTANTIATE (_BASIC_ISTREAM, _WCHAR_T)
139
141 operator>> (wistream&, wstring&));
142
144 getline (wistream&, wstring&, wchar_t));
145#endif // _RWSTD_INSTANTIATE (_BASIC_ISTREAM, _WCHAR_T)
146
147} // namespace std
148
149
150#ifdef _RWSTD_MSVC
151# pragma warning (pop)
152#endif // _RWSTD_MSVC
153
154
155# if _RWSTD_DEFINE_TEMPLATE_LAST (_BASIC_ISTREAM)
156# include <rw/_stringio.cc>
157# endif // _RWSTD_DEFINE_TEMPLATE_LAST (_BASIC_ISTREAM)
158
159
160#endif // !_RWSTD_STRING_EXTRACTORS_INCLUDED
#define _RWSTD_NAMESPACE(name)
Definition _defs.h:567
#define _EXPORT
Definition _defs.h:498
#define _RWSTD_INSTANTIATE_FUN_1(arg)
Definition _defs.h:1410
#define _RWSTD_TI_EXPORT
Definition _defs.h:1331
std::basic_ostream< Char > & operator<<(std::basic_ostream< Char > &lhs, node_type rhs)
Pretty-prints the value of a node_type to a stream.
Definition json.h:5363