2 //===--------------------------- iosfwd -----------------------------------===//
4 // The LLVM Compiler Infrastructure
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 #ifndef _LIBCPP_IOSFWD
12 #define _LIBCPP_IOSFWD
20 template<class charT> struct char_traits;
21 template<class T> class allocator;
24 template <class charT, class traits = char_traits<charT> > class basic_ios;
26 template <class charT, class traits = char_traits<charT> > class basic_streambuf;
27 template <class charT, class traits = char_traits<charT> > class basic_istream;
28 template <class charT, class traits = char_traits<charT> > class basic_ostream;
29 template <class charT, class traits = char_traits<charT> > class basic_iostream;
31 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
32 class basic_stringbuf;
33 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
34 class basic_istringstream;
35 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
36 class basic_ostringstream;
37 template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
38 class basic_stringstream;
40 template <class charT, class traits = char_traits<charT> > class basic_filebuf;
41 template <class charT, class traits = char_traits<charT> > class basic_ifstream;
42 template <class charT, class traits = char_traits<charT> > class basic_ofstream;
43 template <class charT, class traits = char_traits<charT> > class basic_fstream;
45 template <class charT, class traits = char_traits<charT> > class istreambuf_iterator;
46 template <class charT, class traits = char_traits<charT> > class ostreambuf_iterator;
48 typedef basic_ios<char> ios;
49 typedef basic_ios<wchar_t> wios;
51 typedef basic_streambuf<char> streambuf;
52 typedef basic_istream<char> istream;
53 typedef basic_ostream<char> ostream;
54 typedef basic_iostream<char> iostream;
56 typedef basic_stringbuf<char> stringbuf;
57 typedef basic_istringstream<char> istringstream;
58 typedef basic_ostringstream<char> ostringstream;
59 typedef basic_stringstream<char> stringstream;
61 typedef basic_filebuf<char> filebuf;
62 typedef basic_ifstream<char> ifstream;
63 typedef basic_ofstream<char> ofstream;
64 typedef basic_fstream<char> fstream;
66 typedef basic_streambuf<wchar_t> wstreambuf;
67 typedef basic_istream<wchar_t> wistream;
68 typedef basic_ostream<wchar_t> wostream;
69 typedef basic_iostream<wchar_t> wiostream;
71 typedef basic_stringbuf<wchar_t> wstringbuf;
72 typedef basic_istringstream<wchar_t> wistringstream;
73 typedef basic_ostringstream<wchar_t> wostringstream;
74 typedef basic_stringstream<wchar_t> wstringstream;
76 typedef basic_filebuf<wchar_t> wfilebuf;
77 typedef basic_ifstream<wchar_t> wifstream;
78 typedef basic_ofstream<wchar_t> wofstream;
79 typedef basic_fstream<wchar_t> wfstream;
81 template <class state> class fpos;
82 typedef fpos<char_traits<char>::state_type> streampos;
83 typedef fpos<char_traits<wchar_t>::state_type> wstreampos;
90 #include <wchar.h> // for mbstate_t
92 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
93 #pragma GCC system_header
96 _LIBCPP_BEGIN_NAMESPACE_STD
98 class _LIBCPP_TYPE_VIS ios_base;
100 template<class _CharT> struct _LIBCPP_TYPE_VIS_ONLY char_traits;
101 template<class _Tp> class _LIBCPP_TYPE_VIS_ONLY allocator;
103 template <class _CharT, class _Traits = char_traits<_CharT> >
104 class _LIBCPP_TYPE_VIS_ONLY basic_ios;
106 template <class _CharT, class _Traits = char_traits<_CharT> >
107 class _LIBCPP_TYPE_VIS_ONLY basic_streambuf;
108 template <class _CharT, class _Traits = char_traits<_CharT> >
109 class _LIBCPP_TYPE_VIS_ONLY basic_istream;
110 template <class _CharT, class _Traits = char_traits<_CharT> >
111 class _LIBCPP_TYPE_VIS_ONLY basic_ostream;
112 template <class _CharT, class _Traits = char_traits<_CharT> >
113 class _LIBCPP_TYPE_VIS_ONLY basic_iostream;
115 template <class _CharT, class _Traits = char_traits<_CharT>,
116 class _Allocator = allocator<_CharT> >
117 class _LIBCPP_TYPE_VIS_ONLY basic_stringbuf;
118 template <class _CharT, class _Traits = char_traits<_CharT>,
119 class _Allocator = allocator<_CharT> >
120 class _LIBCPP_TYPE_VIS_ONLY basic_istringstream;
121 template <class _CharT, class _Traits = char_traits<_CharT>,
122 class _Allocator = allocator<_CharT> >
123 class _LIBCPP_TYPE_VIS_ONLY basic_ostringstream;
124 template <class _CharT, class _Traits = char_traits<_CharT>,
125 class _Allocator = allocator<_CharT> >
126 class _LIBCPP_TYPE_VIS_ONLY basic_stringstream;
128 template <class _CharT, class _Traits = char_traits<_CharT> >
129 class _LIBCPP_TYPE_VIS_ONLY basic_filebuf;
130 template <class _CharT, class _Traits = char_traits<_CharT> >
131 class _LIBCPP_TYPE_VIS_ONLY basic_ifstream;
132 template <class _CharT, class _Traits = char_traits<_CharT> >
133 class _LIBCPP_TYPE_VIS_ONLY basic_ofstream;
134 template <class _CharT, class _Traits = char_traits<_CharT> >
135 class _LIBCPP_TYPE_VIS_ONLY basic_fstream;
137 template <class _CharT, class _Traits = char_traits<_CharT> >
138 class _LIBCPP_TYPE_VIS_ONLY istreambuf_iterator;
139 template <class _CharT, class _Traits = char_traits<_CharT> >
140 class _LIBCPP_TYPE_VIS_ONLY ostreambuf_iterator;
142 typedef basic_ios<char> ios;
143 typedef basic_ios<wchar_t> wios;
145 typedef basic_streambuf<char> streambuf;
146 typedef basic_istream<char> istream;
147 typedef basic_ostream<char> ostream;
148 typedef basic_iostream<char> iostream;
150 typedef basic_stringbuf<char> stringbuf;
151 typedef basic_istringstream<char> istringstream;
152 typedef basic_ostringstream<char> ostringstream;
153 typedef basic_stringstream<char> stringstream;
155 typedef basic_filebuf<char> filebuf;
156 typedef basic_ifstream<char> ifstream;
157 typedef basic_ofstream<char> ofstream;
158 typedef basic_fstream<char> fstream;
160 typedef basic_streambuf<wchar_t> wstreambuf;
161 typedef basic_istream<wchar_t> wistream;
162 typedef basic_ostream<wchar_t> wostream;
163 typedef basic_iostream<wchar_t> wiostream;
165 typedef basic_stringbuf<wchar_t> wstringbuf;
166 typedef basic_istringstream<wchar_t> wistringstream;
167 typedef basic_ostringstream<wchar_t> wostringstream;
168 typedef basic_stringstream<wchar_t> wstringstream;
170 typedef basic_filebuf<wchar_t> wfilebuf;
171 typedef basic_ifstream<wchar_t> wifstream;
172 typedef basic_ofstream<wchar_t> wofstream;
173 typedef basic_fstream<wchar_t> wfstream;
175 template <class _State> class _LIBCPP_TYPE_VIS_ONLY fpos;
176 typedef fpos<mbstate_t> streampos;
177 typedef fpos<mbstate_t> wstreampos;
178 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
179 typedef fpos<mbstate_t> u16streampos;
180 typedef fpos<mbstate_t> u32streampos;
181 #endif // _LIBCPP_HAS_NO_UNICODE_CHARS
183 #if defined(_NEWLIB_VERSION)
184 // On newlib, off_t is 'long int'
185 typedef long int streamoff; // for char_traits in <string>
187 typedef long long streamoff; // for char_traits in <string>
190 template <class _CharT, // for <stdexcept>
191 class _Traits = char_traits<_CharT>,
192 class _Allocator = allocator<_CharT> >
193 class _LIBCPP_TYPE_VIS_ONLY basic_string;
194 typedef basic_string<char, char_traits<char>, allocator<char> > string;
195 typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
197 _LIBCPP_END_NAMESPACE_STD
199 #endif // _LIBCPP_IOSFWD